Class 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

public class AerospikeException extends RuntimeException
Aerospike exceptions that can be thrown from the client.
See Also:
  • Constructor Details

    • AerospikeException

      public AerospikeException(int resultCode, String message)
    • AerospikeException

      public AerospikeException(int resultCode, Throwable e)
    • AerospikeException

      public AerospikeException(int resultCode)
    • AerospikeException

      public AerospikeException(int resultCode, boolean inDoubt)
    • AerospikeException

      public AerospikeException(int resultCode, String message, Throwable e)
    • AerospikeException

      public AerospikeException(String message, Throwable e)
    • AerospikeException

      public AerospikeException(String message)
    • AerospikeException

      public AerospikeException(Throwable e)
  • Method Details

    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable
    • getBaseMessage

      public String getBaseMessage()
      Return base message without extra metadata.
    • keepConnection

      public final boolean keepConnection()
      Should connection be put back into pool.
    • getNode

      public final Node getNode()
      Get last node used.
    • setNode

      public final void setNode(Node node)
      Set last node used.
    • getPolicy

      public final Policy getPolicy()
      Get command policy. Will be null for non-command exceptions.
    • setPolicy

      public final void setPolicy(Policy policy)
      Set command policy.
    • getSubExceptions

      public final List<AerospikeException> getSubExceptions()
      Get sub exceptions. Will be null if a retry did not occur.
    • setSubExceptions

      public final void setSubExceptions(List<AerospikeException> subExceptions)
      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.