Name | Description | |
---|---|---|
![]() | consistencyLevel |
How replicas should be consulted in a read operation to provide the desired
consistency guarantee.
(Inherited from Policy.)Default: CONSISTENCY_ONE |
![]() | includeBinData |
Indicates if bin data is retrieved. If false, only record digests (and user keys
if stored on the server) are retrieved.
|
![]() | linearizeRead |
Force reads to be linearized for server namespaces that support CP mode.
(Inherited from Policy.)Default: false |
![]() | maxConcurrentNodes |
Maximum number of concurrent requests to server nodes at any point in time.
If there are 16 nodes in the cluster and maxConcurrentNodes is 8, then queries
will be made to 8 nodes in parallel. When a query completes, a new query will
be issued until all 16 nodes have been queried.
Default (0) is to issue requests to all server nodes in parallel.
|
![]() | maxRetries |
Maximum number of retries before aborting the current transaction.
The initial attempt is not counted as a retry.
(Inherited from Policy.)If maxRetries is exceeded, the transaction will abort with AerospikeException Timeout. WARNING: Database writes that are not idempotent (such as Add()) should not be retried because the write operation may be performed multiple times if the client timed out previous transaction attempts. It's important to use a distinct WritePolicy for non-idempotent writes which sets maxRetries = 0; Default: 2 (initial attempt + 2 retries = 3 attempts) |
![]() | priority |
Priority of request relative to other transactions.
Currently, only used for scans.
(Inherited from Policy.) |
![]() | recordQueueSize |
Number of records to place in queue before blocking.
Records received from multiple server nodes will be placed in a queue.
A separate thread consumes these records in parallel.
If the queue is full, the producer threads will block until records are consumed.
|
![]() | replica |
Replica algorithm used to determine the target node for a single record command.
Batch, scan and query are not affected by replica algorithms.
(Inherited from Policy.)Default: SEQUENCE |
![]() | sendKey |
Send user defined key in addition to hash digest on both reads and writes.
If the key is sent on a write, the key will be stored with the record on
the server.
(Inherited from Policy.)Default: false (do not send the user defined key) |
![]() | sleepBetweenRetries |
Milliseconds to sleep between retries. Enter zero to skip sleep.
(Inherited from Policy.)The sleep only occurs on connection errors and server timeouts which suggest a node is down and the cluster is reforming. The sleep does not occur when the client's socketTimeout expires. This field is ignored in async mode. Reads do not have to sleep when a node goes down because the cluster does not shut out reads during cluster reformation. The default for reads is zero. Writes need to wait for the cluster to reform when a node goes down. Immediate write retries on node failure have been shown to consistently result in errors. The default for writes is 500ms. This default is implemented in ClientPolicy |
![]() | socketTimeout |
Socket idle timeout in milliseconds when processing a database command.
(Inherited from Policy.)If socketTimeout is not zero and the socket has been idle for at least socketTimeout, both maxRetries and totalTimeout are checked. If maxRetries and totalTimeout are not exceeded, the transaction is retried. If both socketTimeout and totalTimeout are non-zero and socketTimeout > totalTimeout, then socketTimeout will be set to totalTimeout. If socketTimeout is zero, there will be no socket idle limit. For synchronous methods, socketTimeout is the socket SendTimeout and ReceiveTimeout. For asynchronous methods, the socketTimeout is implemented using an AsyncTimeoutQueue and socketTimeout is only used if totalTimeout is not defined. Default: 0 (no socket idle time limit). |
![]() | totalTimeout |
Total transaction timeout in milliseconds.
(Inherited from Policy.)The totalTimeout is tracked on the client and sent to the server along with the transaction in the wire protocol. The client will most likely timeout first, but the server also has the capability to timeout the transaction. If totalTimeout is not zero and totalTimeout is reached before the transaction completes, the transaction will abort with AerospikeException Timeout. If totalTimeout is zero, there will be no total time limit. Default: 0 (no time limit). |