public final class DseGraph extends Object
Constructor and Description |
---|
DseGraph() |
Modifier and Type | Method and Description |
---|---|
static TraversalBatch |
batch()
Create a
TraversalBatch object to perform batch mutations on a DSE Graph. |
static <S,E> GraphStatement |
statementFromTraversal(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<S,E> traversal)
|
static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource |
traversal()
Create a
GraphTraversalSource
that will be used to build Traversal s
for use with the statementFromTraversal(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<S, E>) method. |
static <C extends org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource> |
traversal(Class<C> traversalSourceClass)
Create a
GraphTraversalSource
instance as specified by the traversalSourceClass parameter that will be used to build
Traversal s for use with the statementFromTraversal(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<S, E>) method. |
static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource |
traversal(DseSession dseSession)
Create a
GraphTraversalSource
initialized to work remotely with a DSE Graph server, communicating via the DataStax Enterprise
Java Driver. |
static <C extends org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource> |
traversal(DseSession dseSession,
Class<C> traversalSourceClass)
Create a
GraphTraversalSource
instance as specified by the traversalSourceClass parameter, initialized to work
remotely with a DSE Graph server, communicating via the DataStax Enterprise Java Driver. |
static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource |
traversal(DseSession dseSession,
GraphOptions graphOptions)
Create a
GraphTraversalSource
initialized to work remotely with a DSE Graph server, communicating via the DataStax Enterprise
Java Driver. |
static <C extends org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource> |
traversal(DseSession dseSession,
GraphOptions graphOptions,
Class<C> traversalSourceClass)
Create a
GraphTraversalSource
instance as specified by the traversalSourceClass parameter, initialized to work
remotely with a DSE Graph server, communicating via the DataStax Enterprise Java Driver. |
public static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource traversal()
GraphTraversalSource
that will be used to build Traversal
s
for use with the statementFromTraversal(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<S, E>)
method.
Iterating on a GraphTraversalSource
created with
this method will not work.
EmptyGraph
.public static <C extends org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource> C traversal(Class<C> traversalSourceClass)
GraphTraversalSource
instance as specified by the traversalSourceClass
parameter that will be used to build
Traversal
s for use with the statementFromTraversal(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<S, E>)
method. This method is typically utilized when specifying a DSL-based
GraphTraversalSource
.
Iterating on a GraphTraversalSource
created with
this method will not work.
traversalSourceClass
- the DSL class to instantiate to work remotely with a DSE Graph
server.EmptyGraph
.public static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource traversal(DseSession dseSession, GraphOptions graphOptions)
GraphTraversalSource
initialized to work remotely with a DSE Graph server, communicating via the DataStax Enterprise
Java Driver.dseSession
- an initialized and active session created with a DseCluster
that will be used internally to communicate with the
DSE server. All of the configurations made on the DseSession's creation will be effective
when the traversal source is used.graphOptions
- configurations to use for this traversal source. The options on this object
will override the ones defined on the GraphOptions
of
the DseCluster
behind the DseSession input.public static <C extends org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource> C traversal(DseSession dseSession, GraphOptions graphOptions, Class<C> traversalSourceClass)
GraphTraversalSource
instance as specified by the traversalSourceClass
parameter, initialized to work
remotely with a DSE Graph server, communicating via the DataStax Enterprise Java Driver. This
method is typically utilized when specifying a DSL-based GraphTraversalSource
.dseSession
- an initialized and active session created with a DseCluster
that will be used internally to communicate with the
DSE server. All of the configurations made on the DseSession's creation will be effective
when the traversal source is used.graphOptions
- configurations to use for this traversal source. The options on this object
will override the ones defined on the GraphOptions
of
the DseCluster
behind the DseSession input.traversalSourceClass
- the DSL class to instantiate to work remotely with a DSE Graph
server.public static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource traversal(DseSession dseSession)
GraphTraversalSource
initialized to work remotely with a DSE Graph server, communicating via the DataStax Enterprise
Java Driver.dseSession
- an initialized and active session created with a DseCluster
that will be used internally to communicate with the
DSE server. All of the configurations made on the DseSession's creation will be effective
when the traversal source is used.public static <C extends org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource> C traversal(DseSession dseSession, Class<C> traversalSourceClass)
GraphTraversalSource
instance as specified by the traversalSourceClass
parameter, initialized to work
remotely with a DSE Graph server, communicating via the DataStax Enterprise Java Driver. This
method is typically utilized when specifying a DSL-based GraphTraversalSource
.dseSession
- an initialized and active session created with a DseCluster
that will be used internally to communicate with the
DSE server. All of the configurations made on the DseSession's creation will be effective
when the traversal source is used.traversalSourceClass
- the DSL class to instantiate to work remotely with a DSE Graph
server.public static <S,E> GraphStatement statementFromTraversal(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<S,E> traversal)
traversal
- the Traversal to use to create the statement.DseSession.executeGraph(java.lang.String)
or
DseSession.executeGraphAsync(java.lang.String)
call.public static TraversalBatch batch()
TraversalBatch
object to perform batch mutations on a DSE Graph.
Mutations made to the DSE Graph via a TraversalBatch
may all or none succeed. In
case of an issue during one of the mutations, the execution of the batch will fail and none of
the mutations will have been applied. A TraversalBatch
can be directly executed via
DseSession.executeGraph(java.lang.String)
.
Note that executing a TraversalBatch
via the DseSession
will return an empty result. If the batch has completed
successfully then there will be no error thrown, otherwise an error is thrown, but no result is
ever returned since batch operations are only destined to graph mutations, hence, no result is
necessary.
TraversalBatch
is only usable against a DSE 6.0+ cluster.
TraversalBatch
object allowing to execute mutations inside the same single
transaction.Copyright © 2012–2019. All rights reserved.