Struct aerospike::policy::BasePolicy[][src]

pub struct BasePolicy {
    pub priority: Priority,
    pub consistency_level: ConsistencyLevel,
    pub timeout: Option<Duration>,
    pub max_retries: Option<usize>,
    pub sleep_between_retries: Option<Duration>,
}

Common parameters shared by all policy types.

Fields

Priority of request relative to other transactions. Currently, only used for scans.

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.

Timeout specifies transaction timeout. This timeout is used to set the socket timeout and is also sent to the server along with the transaction in the wire protocol. Default to no timeout (0).

MaxRetries determines 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.

SleepBetweenReplies determines duration to sleep between retries if a transaction fails and the timeout was not exceeded. Enter zero to skip sleep.

Trait Implementations

impl Debug for BasePolicy
[src]

Formats the value using the given formatter. Read more

impl Clone for BasePolicy
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Policy for BasePolicy
[src]

Transaction priority.

How replicas should be consulted in read operations to provide the desired consistency guarantee. Read more

Total transaction timeout 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. Read more

Maximum number of retries before aborting the current transaction. A retry may be attempted when there is a network error. If max_retries is exceeded, the abort will occur even if the timeout has not yet been exceeded. Read more

Time to sleep between retries. Set to zero to skip sleep. Default: 500ms.

Auto Trait Implementations

impl Send for BasePolicy

impl Sync for BasePolicy