Skip to content

Instantly share code, notes, and snippets.

@daschl
Created September 19, 2014 07:36
Show Gist options
  • Save daschl/28105a6ce67bf62f11a6 to your computer and use it in GitHub Desktop.
Save daschl/28105a6ce67bf62f11a6 to your computer and use it in GitHub Desktop.
List<JsonDocument> foundDocs = Observable
.from(Arrays.asList("id1", "id2"))
.flatMap(new Func1<String, Observable<JsonDocument>>() {
@Override
public Observable<JsonDocument> call(String id) {
return bucket.async().get(id);
}
})
.toList()
.timeout(5, TimeUnit.SECONDS)
.toBlocking()
.single();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment