com.datastax.driver.core.exceptions
Class QueryTimeoutException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.datastax.driver.core.exceptions.DriverException
                  extended by com.datastax.driver.core.exceptions.QueryExecutionException
                      extended by com.datastax.driver.core.exceptions.QueryTimeoutException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ReadTimeoutException, WriteTimeoutException

public abstract class QueryTimeoutException
extends QueryExecutionException

A Cassandra timeout during a query. Such an exception is returned when the query has been tried by Cassandra but cannot be achieved with the requested consistency level within the rpc timeout set for Cassandra.

See Also:
Serialized Form

Constructor Summary
protected QueryTimeoutException(String msg, ConsistencyLevel consistency, int received, int required)
           
protected QueryTimeoutException(String msg, Throwable cause, ConsistencyLevel consistency, int received, int required)
           
 
Method Summary
 ConsistencyLevel getConsistencyLevel()
          The consistency level of the operation that time outed.
 int getReceivedAcknowledgements()
          The number of replica that had acknowledged/responded to the operation before it time outed.
 int getRequiredAcknowledgements()
          The minimum number of replica acknowledgements/responses that were required to fulfill the operation.
 
Methods inherited from class com.datastax.driver.core.exceptions.DriverException
copy
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryTimeoutException

protected QueryTimeoutException(String msg,
                                ConsistencyLevel consistency,
                                int received,
                                int required)

QueryTimeoutException

protected QueryTimeoutException(String msg,
                                Throwable cause,
                                ConsistencyLevel consistency,
                                int received,
                                int required)
Method Detail

getConsistencyLevel

public ConsistencyLevel getConsistencyLevel()
The consistency level of the operation that time outed.

Returns:
the consistency level of the operation that time outed.

getReceivedAcknowledgements

public int getReceivedAcknowledgements()
The number of replica that had acknowledged/responded to the operation before it time outed.

Returns:
the number of replica that had acknowledged/responded the operation before it time outed.

getRequiredAcknowledgements

public int getRequiredAcknowledgements()
The minimum number of replica acknowledgements/responses that were required to fulfill the operation.

Returns:
The minimum number of replica acknowledgements/response that were required to fulfill the operation.


Copyright © 2013. All Rights Reserved.