Class BatchPolicy

java.lang.Object
com.aerospike.client.policy.Policy
com.aerospike.client.policy.BatchPolicy

public final class BatchPolicy extends Policy
Batch parent policy.
  • Field Details

    • allowInline

      public boolean allowInline
      Allow batch to be processed immediately in the server's receiving thread for in-memory namespaces. If false, the batch will always be processed in separate service threads.

      For batch transactions with smaller sized records (<= 1K per record), inline processing will be significantly faster on in-memory namespaces.

      Inline processing can introduce the possibility of unfairness because the server can process the entire batch before moving onto the next command.

      Default: true

    • allowInlineSSD

      public boolean allowInlineSSD
      Allow batch to be processed immediately in the server's receiving thread for SSD namespaces. If false, the batch will always be processed in separate service threads. Server versions < 6.0 ignore this field.

      Inline processing can introduce the possibility of unfairness because the server can process the entire batch before moving onto the next command.

      Default: false

    • respondAllKeys

      public boolean respondAllKeys
      Should all batch keys be attempted regardless of errors. This field is used on both the client and server. The client handles node specific errors and the server handles key specific errors.

      If true, every batch key is attempted regardless of previous key specific errors. Node specific errors such as timeouts stop keys to that node, but keys directed at other nodes will continue to be processed.

      If false, the server will stop the batch to its node on most key specific errors. The exceptions are ResultCode.KEY_NOT_FOUND_ERROR and ResultCode.FILTERED_OUT which never stop the batch.

      Server versions < 6.0 do not support this field and treat this value as false for key specific errors.

      Default: true

    • sendSetName

      @Deprecated public boolean sendSetName
      Deprecated.
      This method is deprecated and will eventually be removed. The set name is now always sent for every distinct namespace/set in the batch.

      Send set name field to server for every key in the batch for batch index protocol. This is necessary for batch writes and batch reads when authentication is enabled and security roles are defined on a per set basis.

      Default: false

  • Constructor Details

    • BatchPolicy

      public BatchPolicy(BatchPolicy other)
      Copy batch policy from another batch policy.
    • BatchPolicy

      public BatchPolicy(Policy other)
      Copy batch policy from another policy.
    • BatchPolicy

      public BatchPolicy()
      Default constructor.
  • Method Details

    • ReadDefault

      public static BatchPolicy ReadDefault()
      Default batch read policy.
    • WriteDefault

      public static BatchPolicy WriteDefault()
      Default batch write policy.
    • setAllowInline

      public void setAllowInline(boolean allowInline)
    • setAllowInlineSSD

      public void setAllowInlineSSD(boolean allowInlineSSD)
    • setRespondAllKeys

      public void setRespondAllKeys(boolean respondAllKeys)