Package com.aerospike.client
Class AerospikeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.aerospike.client.AerospikeException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AerospikeException.Backoff,AerospikeException.BatchExists,AerospikeException.BatchRecordArray,AerospikeException.BatchRecords,AerospikeException.Commit,AerospikeException.Connection,AerospikeException.InvalidNamespace,AerospikeException.InvalidNode,AerospikeException.Parse,AerospikeException.QueryTerminated,AerospikeException.ScanTerminated,AerospikeException.Serialize,AerospikeException.Timeout
Aerospike exceptions that can be thrown from the client.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classException thrown when async command was rejected because the async delay queue is full.static classException thrown when node is in backoff mode due to excessive number of errors.static final classException thrown when a batch exists method fails.static final classException thrown when a batch write method fails.static final classException thrown when a batch read method fails.static final classException thrown when a multi-record transaction commit fails.static final classException thrown when client can't connect to the server.static final classException thrown when namespace is invalid.static final classException thrown when chosen node is not active.static final classException thrown when client can't parse data returned from server.static final classException thrown when query was terminated prematurely.static final classException thrown when scan was terminated prematurely.static final classException thrown when a Java serialization error occurs.static final classException thrown when database request expires before completing. -
Constructor Summary
ConstructorsConstructorDescriptionAerospikeException(int resultCode) AerospikeException(int resultCode, boolean inDoubt) AerospikeException(int resultCode, String message) AerospikeException(int resultCode, String message, Throwable e) AerospikeException(int resultCode, Throwable e) AerospikeException(String message) AerospikeException(String message, Throwable e) -
Method Summary
Modifier and TypeMethodDescriptionReturn base message without extra metadata.final booleanIs it possible that write command may have completed.final intGet number of attempts before failing.final NodegetNode()Get last node used.final PolicyGet command policy.final intGet integer result code.final List<AerospikeException> Get sub exceptions.final booleanShould connection be put back into pool.voidsetInDoubt(boolean inDoubt) Sets the inDoubt value to inDoubt.final voidsetInDoubt(boolean isWrite, int commandSentCounter) Set whether it is possible that the write command may have completed even though this exception was generated.final voidsetIteration(int iteration) Set number of attempts before failing.final voidSet last node used.final voidSet command policy.final voidsetSubExceptions(List<AerospikeException> subExceptions) Set sub exceptions.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
AerospikeException
-
AerospikeException
-
AerospikeException
public AerospikeException(int resultCode) -
AerospikeException
public AerospikeException(int resultCode, boolean inDoubt) -
AerospikeException
-
AerospikeException
-
AerospikeException
-
AerospikeException
-
-
Method Details
-
getMessage
- Overrides:
getMessagein classThrowable
-
getBaseMessage
Return base message without extra metadata. -
keepConnection
public final boolean keepConnection()Should connection be put back into pool. -
getNode
Get last node used. -
setNode
Set last node used. -
getPolicy
Get command policy. Will be null for non-command exceptions. -
setPolicy
Set command policy. -
getSubExceptions
Get sub exceptions. Will be null if a retry did not occur. -
setSubExceptions
Set sub exceptions. -
getResultCode
public final int getResultCode()Get integer result code. -
getIteration
public final int getIteration()Get number of attempts before failing. -
setIteration
public final void setIteration(int iteration) Set number of attempts before failing. -
getInDoubt
public final boolean getInDoubt()Is it possible that write command may have completed. -
setInDoubt
public final void setInDoubt(boolean isWrite, int commandSentCounter) Set whether it is possible that the write command may have completed even though this exception was generated. This may be the case when a client error occurs (like timeout) after the command was sent to the server. -
setInDoubt
public void setInDoubt(boolean inDoubt) Sets the inDoubt value to inDoubt.
-