|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.datastax.driver.core.ExecutionInfo
public class ExecutionInfo
Basic information on the execution of a query.
This provides the following information on the execution of a (successful) query:
Method Summary | |
---|---|
ConsistencyLevel |
getAchievedConsistencyLevel()
If the query returned without achieving the requested consistency level due to the RetryPolicy , this
return the biggest consistency level that has been actually achieved by
the query. |
Host |
getQueriedHost()
Return the Cassandra host that coordinated this query. |
QueryTrace |
getQueryTrace()
The query trace if tracing was enabled on this query. |
List<Host> |
getTriedHosts()
The list of tried hosts for this query. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public List<Host> getTriedHosts()
In general, this will be a singleton list with the host that coordinated
that query. However, if an host is tried by the driver but is dead or in
error, that host is recorded and the query is retry. Also, on a timeout
or unavailable exception, some
RetryPolicy
may retry the
query on the same host, so the same host might appear twice.
If you are only interested in fetching the final (and often only) node
coordinating the query, getQueriedHost()
provides a shortcut to
fetch the last element of the list returned by this method.
public Host getQueriedHost()
This is a shortcut for getTriedHosts().get(getTriedHosts().size())
.
public ConsistencyLevel getAchievedConsistencyLevel()
RetryPolicy
, this
return the biggest consistency level that has been actually achieved by
the query.
Note that the default RetryPolicy
(DefaultRetryPolicy
)
will never allow a query to be successful without achieving the
initially requested consistency level and hence with that default
policy, this method will always return null
. However, it
might occasionally return a non-null
with say,
DowngradingConsistencyRetryPolicy
.
public QueryTrace getQueryTrace()
QueryTrace
object for this query if tracing was
enable for this query, or null
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |