public class RemoteSourceSimpleGraphStatement extends GraphStatement
GraphStatement specifically used for remote traversal sources
connected via a DseSession. This implementation will
be used by the DseRemoteConnection, the main reason for this class is that it
only supports GraphSON 2 sub-protocol and does not require configuration, which is not
the case of the default SimpleGraphStatement.| Constructor and Description |
|---|
RemoteSourceSimpleGraphStatement(String query) |
| Modifier and Type | Method and Description |
|---|---|
GraphStatement |
executingAs(String userOrRole)
Allows this statement to be executed as a different user/role
than the one currently authenticated (a.k.a.
|
ConsistencyLevel |
getConsistencyLevel()
Returns the consistency level to use with this statement.
|
long |
getDefaultTimestamp()
The default timestamp for this query.
|
int |
getReadTimeoutMillis()
Return the per-host socket read timeout that was set for this statement.
|
GraphStatement |
setConsistencyLevel(ConsistencyLevel consistencyLevel)
Sets the consistency level to use for this statement.
|
GraphStatement |
setDefaultTimestamp(long defaultTimestamp)
Sets the default timestamp for this query (in microseconds since the epoch).
|
GraphStatement |
setReadTimeoutMillis(int readTimeoutMillis)
Overrides the default per-host read timeout (
GraphOptions.setReadTimeoutMillis(int)) for this statement. |
Statement |
unwrap()
This method is deprecated because a
GraphOptions object is required to produce
a valid Statement. |
Statement |
unwrap(GraphOptions graphOptions)
"Unwraps" the current graph statement, that is,
returns an executable
Statement object corresponding to this graph statement. |
Statement |
unwrap(GraphProtocol graphProtocol)
This method is deprecated because a
GraphOptions object is required to produce
a valid Statement. |
getGraphInternalOption, getGraphLanguage, getGraphName, getGraphReadConsistencyLevel, getGraphSource, getGraphWriteConsistencyLevel, getTransformResultFunction, isIdempotent, isSystemQuery, setGraphInternalOption, setGraphLanguage, setGraphName, setGraphReadConsistencyLevel, setGraphSource, setGraphWriteConsistencyLevel, setIdempotent, setSystemQuery, setTransformResultFunctionpublic RemoteSourceSimpleGraphStatement(String query)
public GraphStatement setConsistencyLevel(ConsistencyLevel consistencyLevel)
GraphStatementGraphStatement.setGraphReadConsistencyLevel(ConsistencyLevel) and
GraphStatement.setGraphWriteConsistencyLevel(ConsistencyLevel) and will override the consistency set here.setConsistencyLevel in class GraphStatementconsistencyLevel - the consistency level to set.GraphStatement instance (for method chaining).public ConsistencyLevel getConsistencyLevel()
GraphStatementGraphStatement.setConsistencyLevel(ConsistencyLevel) for more information.getConsistencyLevel in class GraphStatementpublic GraphStatement setDefaultTimestamp(long defaultTimestamp)
GraphStatementLong.MIN_VALUE;TimestampGenerator currently in use,
if different from Long.MIN_VALUE.setDefaultTimestamp in class GraphStatementdefaultTimestamp - the default timestamp for this query (must be strictly
positive).GraphStatement instance (for method chaining).DseCluster.Builder.withTimestampGenerator(com.datastax.driver.core.TimestampGenerator)public long getDefaultTimestamp()
GraphStatementgetDefaultTimestamp in class GraphStatementpublic int getReadTimeoutMillis()
GraphStatementgetReadTimeoutMillis in class GraphStatementGraphOptions.getReadTimeoutMillis() will be used.public GraphStatement setReadTimeoutMillis(int readTimeoutMillis)
GraphStatementGraphOptions.setReadTimeoutMillis(int)) for this statement.
If you don't call this method, the default GraphOptions.getReadTimeoutMillis() will be used.setReadTimeoutMillis in class GraphStatementreadTimeoutMillis - the timeout to set. 0 will disable the timeout for the query, negative values
are not allowed.GraphOptions instance (for method chaining).public GraphStatement executingAs(String userOrRole)
GraphStatementexecutingAs in class GraphStatementuserOrRole - The user or role name to act as when executing this statement.public Statement unwrap()
GraphStatementGraphOptions object is required to produce
a valid Statement. Use GraphStatement.unwrap(GraphOptions) instead.
This method will call GraphStatement#unwrap(GraphProtocol.GRAPHSON_1_0).unwrap in class GraphStatementStatement.public Statement unwrap(GraphProtocol graphProtocol)
GraphStatementGraphOptions object is required to produce
a valid Statement. Use GraphStatement.unwrap(GraphOptions) instead.
This method will call GraphStatement#unwrap(new GraphOptions().setGraphSubProtocol(graphProtocol)).unwrap in class GraphStatementpublic Statement unwrap(GraphOptions graphOptions)
GraphStatementStatement object corresponding to this graph statement.
This method is intended for internal use only, users wishing to execute graph statements
should use DseSession.executeGraph(GraphStatement).
This method acts as a bridge between graph statements and
regular Statements.
Implementations are free to cache the returned Statement if appropriate.unwrap in class GraphStatementgraphOptions - the graph options required to encode the statement's
parameters into the correct sub-protocol format.Statement.Copyright © 2012–2018. All rights reserved.