Trait aerospike::policy::Policy [] [src]

pub trait Policy {
    fn priority(&self) -> &Priority;
    fn timeout(&self) -> Option<Duration>;
    fn max_retries(&self) -> Option<usize>;
    fn sleep_between_retries(&self) -> Option<Duration>;
    fn consistency_level(&self) -> &ConsistencyLevel;
}

Trait implemented by most policy types; policies that implement this trait typically encompass an instance of BasePolicy.

Required Methods

Transaction priority.

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.

The timeout is also used as a socket timeout. Default: 0 (no timeout).

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.

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

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

Implementors