public interface CypherGremlinClient extends Closeable
| Modifier and Type | Method and Description |
|---|---|
static CypherGremlinClient |
bytecode(Client client)
Creates a
CypherGremlinClient that can send Cypher queries
to any Gremlin Server or a compatible graph database as Gremlin bytecode. |
static CypherGremlinClient |
bytecode(Client client,
Supplier<Translator<Bytecode,P>> translatorSupplier)
Creates a
CypherGremlinClient that can send Cypher queries
to any Gremlin Server or a compatible graph database as Gremlin bytecode. |
static CypherGremlinClient |
bytecode(Client client,
org.opencypher.gremlin.translation.translator.TranslatorFlavor flavor)
Creates a
CypherGremlinClient that can send Cypher queries
to any Gremlin Server or a compatible graph database as Gremlin bytecode. |
void |
close()
Closes the underlying Gremlin client.
|
static CypherGremlinClient |
inMemory(GraphTraversalSource gts)
Creates a
CypherGremlinClient that executes Cypher queries
directly on the configured GraphTraversalSource. |
static CypherGremlinClient |
plugin(Client client)
Creates a
CypherGremlinClient that can send Cypher queries
to a remote Gremlin Server with Cypher plugin. |
static CypherGremlinClient |
retrieving(Client client,
org.opencypher.gremlin.translation.translator.TranslatorFlavor flavor)
Creates a
CypherGremlinClient that can send Cypher queries
to any Gremlin Server or a compatible graph database as Gremlin-Groovy. |
default CypherStatement.Submittable |
statement(String cypher)
Builder for Cypher statement advanced configuration.
|
default CypherResultSet |
submit(String cypher)
Submits a Cypher query.
|
default CypherResultSet |
submit(String cypher,
Map<String,?> parameters)
Submits a Cypher query.
|
CompletableFuture<CypherResultSet> |
submitAsync(CypherStatement statement)
Submits a Cypher statement asynchronously.
|
default CompletableFuture<CypherResultSet> |
submitAsync(String cypher)
Submits a Cypher query asynchronously.
|
default CompletableFuture<CypherResultSet> |
submitAsync(String cypher,
Map<String,?> parameters)
Submits a Cypher query asynchronously.
|
static CypherGremlinClient |
translating(Client client)
Creates a
CypherGremlinClient that can send Cypher queries
to any Gremlin Server or a compatible graph database as Gremlin-Groovy. |
static CypherGremlinClient |
translating(Client client,
Supplier<Translator<String,GroovyPredicate>> translatorSupplier)
Creates a
CypherGremlinClient that can send Cypher queries
to any Gremlin Server or a compatible graph database as Gremlin-Groovy. |
static CypherGremlinClient |
translating(Client client,
org.opencypher.gremlin.translation.translator.TranslatorFlavor flavor)
Creates a
CypherGremlinClient that can send Cypher queries
to any Gremlin Server or a compatible graph database as Gremlin-Groovy. |
static CypherGremlinClient plugin(Client client)
CypherGremlinClient that can send Cypher queries
to a remote Gremlin Server with Cypher plugin.client - Gremlin clientstatic CypherGremlinClient translating(Client client)
CypherGremlinClient that can send Cypher queries
to any Gremlin Server or a compatible graph database as Gremlin-Groovy.
Cypher to Gremlin translation is done on the client's thread, before sending the query to Gremlin Server.
client - Gremlin clientstatic CypherGremlinClient translating(Client client, org.opencypher.gremlin.translation.translator.TranslatorFlavor flavor)
CypherGremlinClient that can send Cypher queries
to any Gremlin Server or a compatible graph database as Gremlin-Groovy.
Cypher to Gremlin translation is done on the client's thread, before sending the query to Gremlin Server.
client - Gremlin clientflavor - translation flavorstatic CypherGremlinClient translating(Client client, Supplier<Translator<String,GroovyPredicate>> translatorSupplier)
CypherGremlinClient that can send Cypher queries
to any Gremlin Server or a compatible graph database as Gremlin-Groovy.
Cypher to Gremlin translation is done on the client's thread, before sending the query to Gremlin Server.
client - Gremlin clienttranslatorSupplier - translator configuration supplierstatic CypherGremlinClient bytecode(Client client)
CypherGremlinClient that can send Cypher queries
to any Gremlin Server or a compatible graph database as Gremlin bytecode.
Cypher to Gremlin translation is done on the client's thread, before sending the query to Gremlin Server.
client - Gremlin clientstatic CypherGremlinClient bytecode(Client client, org.opencypher.gremlin.translation.translator.TranslatorFlavor flavor)
CypherGremlinClient that can send Cypher queries
to any Gremlin Server or a compatible graph database as Gremlin bytecode.
Cypher to Gremlin translation is done on the client's thread, before sending the query to Gremlin Server.
client - Gremlin clientflavor - translation flavorstatic CypherGremlinClient bytecode(Client client, Supplier<Translator<Bytecode,P>> translatorSupplier)
CypherGremlinClient that can send Cypher queries
to any Gremlin Server or a compatible graph database as Gremlin bytecode.
Cypher to Gremlin translation is done on the client's thread, before sending the query to Gremlin Server.
client - Gremlin clienttranslatorSupplier - translator configuration supplierstatic CypherGremlinClient inMemory(GraphTraversalSource gts)
CypherGremlinClient that executes Cypher queries
directly on the configured GraphTraversalSource.
Cypher to Gremlin translation is done on the client's thread. Graph traversal execution is not synchronized.
gts - source of GraphTraversal to translate tostatic CypherGremlinClient retrieving(Client client, org.opencypher.gremlin.translation.translator.TranslatorFlavor flavor)
CypherGremlinClient that can send Cypher queries
to any Gremlin Server or a compatible graph database as Gremlin-Groovy.
Cypher to Gremlin translation is done on the client's thread, before sending the query to Gremlin Server.
Difference with translating(Client, TranslatorFlavor) is that on request client retrieves and stores
the entire result stream. See ResultSet.all().
This is not optimal for large result sets as the results will be held in memory at once. Use only for compatibility reasons.
client - Gremlin clientflavor - translation flavortranslating(Client, TranslatorFlavor)void close()
close in interface AutoCloseableclose in interface Closeabledefault CypherResultSet submit(String cypher)
cypher - query textdefault CypherResultSet submit(String cypher, Map<String,?> parameters)
cypher - query textparameters - query parametersdefault CompletableFuture<CypherResultSet> submitAsync(String cypher)
cypher - query textdefault CypherStatement.Submittable statement(String cypher)
cypher - query textdefault CompletableFuture<CypherResultSet> submitAsync(String cypher, Map<String,?> parameters)
cypher - query textparameters - query parametersCompletableFuture<CypherResultSet> submitAsync(CypherStatement statement)
statement - Cypher statementstatement(String)