use of org.opencypher.gremlin.client.CypherGremlinClient in project cypher-for-gremlin by opencypher.
the class CypherGremlinServerClient method async.
@Test
public void async() {
CypherGremlinClient cypherGremlinClient = gremlinServer.cypherGremlinClient();
// freshReadmeSnippet: async
String cypher = "MATCH (p:person) WHERE p.age > 25 RETURN p.name";
CompletableFuture<CypherResultSet> future = cypherGremlinClient.submitAsync(cypher);
future.thenApply(CypherResultSet::all).thenAccept(resultSet -> {
// ...
});
// freshReadmeSnippet: async
}
Aggregations