public class GraphOptions extends Object
GraphStatement.setGraphName(String)).
Graph options are specified at cluster initialization with
DseCluster.Builder.withGraphOptions(GraphOptions), and can be retrieved at runtime
with dseCluster.getConfiguration().getGraphOptions().| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_GRAPH_LANGUAGE
The default value for
getGraphLanguage() ("gremlin-groovy"). |
static String |
DEFAULT_GRAPH_SOURCE
The default value for
getGraphSource() ("g"). |
| Constructor and Description |
|---|
GraphOptions() |
| Modifier and Type | Method and Description |
|---|---|
Map<String,ByteBuffer> |
buildPayloadWithDefaults(GraphStatement statement)
Builds the custom payload for the given statement, providing defaults from these graph options if necessary.
|
String |
getGraphLanguage()
Returns the graph language to use in graph queries.
|
String |
getGraphName()
Returns the graph name to use in graph queries.
|
ConsistencyLevel |
getGraphReadConsistencyLevel()
Returns the read consistency level to use in graph queries.
|
String |
getGraphSource()
Returns the graph traversal source name to use in graph queries.
|
ConsistencyLevel |
getGraphWriteConsistencyLevel()
Returns the write consistency level to use in graph queries.
|
int |
getReadTimeoutMillis()
Return the per-host socket read timeout that is set for all graph queries.
|
GraphOptions |
setGraphLanguage(String graphLanguage)
Sets the graph language to use in graph queries.
|
GraphOptions |
setGraphName(String graphName)
Sets the graph name to use in graph queries.
|
GraphOptions |
setGraphReadConsistencyLevel(ConsistencyLevel cl)
Sets the read consistency level to use for graph queries.
|
GraphOptions |
setGraphSource(String graphSource)
Sets the graph traversal source name to use in graph queries.
|
GraphOptions |
setGraphWriteConsistencyLevel(ConsistencyLevel cl)
Sets the write consistency level to use for graph queries.
|
GraphOptions |
setReadTimeoutMillis(int readTimeoutMillis)
Sets the per-host read timeout in milliseconds for graph queries.
|
public static final String DEFAULT_GRAPH_LANGUAGE
getGraphLanguage() ("gremlin-groovy").public static final String DEFAULT_GRAPH_SOURCE
getGraphSource() ("g").public String getGraphLanguage()
setGraphLanguage(String)public GraphOptions setGraphLanguage(String graphLanguage)
graphLanguage - the graph language to use in graph queries.GraphOptions instance (for method chaining).public String getGraphSource()
setGraphSource(String)public GraphOptions setGraphSource(String graphSource)
graphSource - the graph traversal source name to use in graph queries.GraphOptions instance (for method chaining).public String getGraphName()
setGraphName(String)public GraphOptions setGraphName(String graphName)
graphName - The Graph name to use in graph queries.GraphOptions instance (for method chaining).public ConsistencyLevel getGraphReadConsistencyLevel()
public GraphOptions setGraphReadConsistencyLevel(ConsistencyLevel cl)
GraphStatement.setConsistencyLevel(ConsistencyLevel)
only for the READ part of the graph query.
Please see GraphStatement.setConsistencyLevel(ConsistencyLevel) for more information.cl - the consistency level to set.GraphOptions instance (for method chaining).public ConsistencyLevel getGraphWriteConsistencyLevel()
public GraphOptions setGraphWriteConsistencyLevel(ConsistencyLevel cl)
GraphStatement.setConsistencyLevel(ConsistencyLevel)
only for the write part of the graph query.
Please see GraphStatement.setConsistencyLevel(ConsistencyLevel) for more information.cl - the consistency level to set.GraphStatement instance (for method chaining).public int getReadTimeoutMillis()
public GraphOptions setReadTimeoutMillis(int readTimeoutMillis)
dse.yaml).
Note that the server will abort a query once the client has stopped waiting for it, so there's no risk of leaving
long-running queries on the server.readTimeoutMillis - the timeout to set.GraphOptions instance (for method chaining).public Map<String,ByteBuffer> buildPayloadWithDefaults(GraphStatement statement)
statement - the statement.