@Immutable public class DefaultGraphExecutionInfo extends Object implements GraphExecutionInfo
Constructor and Description |
---|
DefaultGraphExecutionInfo(GraphStatement<?> statement,
com.datastax.oss.driver.api.core.metadata.Node coordinator,
int speculativeExecutionCount,
int successfulExecutionIndex,
List<Map.Entry<com.datastax.oss.driver.api.core.metadata.Node,Throwable>> errors,
com.datastax.oss.protocol.internal.Frame frame) |
Modifier and Type | Method and Description |
---|---|
com.datastax.oss.driver.api.core.metadata.Node |
getCoordinator()
The node that was used as a coordinator to successfully complete the query.
|
List<Map.Entry<com.datastax.oss.driver.api.core.metadata.Node,Throwable>> |
getErrors()
The errors encountered on previous coordinators, if any.
|
Map<String,ByteBuffer> |
getIncomingPayload()
The custom payload sent back by the server with the response, if any (otherwise the map will be
empty).
|
int |
getSpeculativeExecutionCount()
The number of speculative executions that were started for this query.
|
GraphStatement<?> |
getStatement()
The statement that was executed.
|
int |
getSuccessfulExecutionIndex()
The index of the execution that completed this query.
|
List<String> |
getWarnings()
The server-side warnings for this query, if any (otherwise the list will be empty).
|
public DefaultGraphExecutionInfo(GraphStatement<?> statement, com.datastax.oss.driver.api.core.metadata.Node coordinator, int speculativeExecutionCount, int successfulExecutionIndex, List<Map.Entry<com.datastax.oss.driver.api.core.metadata.Node,Throwable>> errors, com.datastax.oss.protocol.internal.Frame frame)
public GraphStatement<?> getStatement()
GraphExecutionInfo
getStatement
in interface GraphExecutionInfo
public com.datastax.oss.driver.api.core.metadata.Node getCoordinator()
GraphExecutionInfo
getCoordinator
in interface GraphExecutionInfo
public int getSpeculativeExecutionCount()
GraphExecutionInfo
This does not include the initial, normal execution of the query. Therefore, if speculative executions are disabled, this will always be 0. If they are enabled and one speculative execution was triggered in addition to the initial execution, this will be 1, etc.
getSpeculativeExecutionCount
in interface GraphExecutionInfo
SpeculativeExecutionPolicy
public int getSuccessfulExecutionIndex()
GraphExecutionInfo
0 represents the initial, normal execution of the query, 1 the first speculative execution, etc.
getSuccessfulExecutionIndex
in interface GraphExecutionInfo
SpeculativeExecutionPolicy
public List<Map.Entry<com.datastax.oss.driver.api.core.metadata.Node,Throwable>> getErrors()
GraphExecutionInfo
The list is in chronological order, based on the time that the driver processed the error responses. If speculative executions are enabled, they run concurrently so their errors will be interleaved. A node can appear multiple times (if the retry policy decided to retry on the same node).
getErrors
in interface GraphExecutionInfo
public List<String> getWarnings()
GraphExecutionInfo
This feature is only available with DefaultProtocolVersion.V4
or above; with lower
versions, this list will always be empty.
getWarnings
in interface GraphExecutionInfo
public Map<String,ByteBuffer> getIncomingPayload()
GraphExecutionInfo
This method returns a read-only view of the original map, but its values remain inherently
mutable. If multiple clients will read these values, care should be taken not to corrupt the
data (in particular, preserve the indices by calling ByteBuffer.duplicate()
).
This feature is only available with DefaultProtocolVersion.V4
or above; with lower
versions, this map will always be empty.
getIncomingPayload
in interface GraphExecutionInfo
Copyright © 2017–2019. All rights reserved.