Skip to content

Instantly share code, notes, and snippets.

@mgodave
Last active December 17, 2015 02:19
Show Gist options
  • Select an option

  • Save mgodave/5535286 to your computer and use it in GitHub Desktop.

Select an option

Save mgodave/5535286 to your computer and use it in GitHub Desktop.
ListenableFuture<RowKey> rowKeyFuture = indexService.lookUp(query);
AsyncFunction<RowKey, QueryResult> queryFunction =
new AsyncFunction<RowKey, QueryResult>() {
public ListenableFuture<QueryResult> apply(RowKey rowKey) {
return dataService.read(rowKey);
}
};
ListenableFuture<QueryResult> queryFuture = transform(rowKeyFuture, queryFunction);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment