Policy FieldsAerospike
The Policy type exposes the following members.
Fields

  NameDescription
Public fieldconsistencyLevel
How replicas should be consulted in a read operation to provide the desired consistency guarantee. Default to allowing one replica to be used in the read operation.
Public fieldmaxRetries
Maximum number of retries before aborting the current transaction. A retry is attempted when there is a network error other than timeout. If maxRetries is exceeded, the abort will occur even if the timeout has not yet been exceeded. The default number of retries is 1.
Public fieldpriority
Priority of request relative to other transactions. Currently, only used for scans.
Public fieldreplica
Send read commands to the node containing the key's partition replica type. Write commands are not affected by this setting, because all writes are directed to the node containing the key's master partition.

Default to sending read commands to the node containing the key's master partition.

Public fieldsendKey
Send user defined key in addition to hash digest on both reads and writes. The default is to not send the user defined key.
Public fieldsleepBetweenRetries
Milliseconds to sleep between retries if a transaction fails and the timeout was not exceeded. The default sleep between retries is 500 ms.
Public fieldtimeout
Total transaction timeout in milliseconds for both client and server. The timeout is tracked on the client and also sent to the server along with the transaction in the wire protocol. The client will most likely timeout first, but the server has the capability to timeout the transaction as well.

The timeout is also used as a socket timeout. Retries will not occur if the timeout limit has been reached. Default to no timeout (0).

Back to Top
See Also