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: Priority
Priority of request relative to other transactions. Currently, only used for scans.
consistency_level: ConsistencyLevel
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: Option<Duration>
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).
max_retries: Option<usize>
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.
sleep_between_retries: Option<Duration>
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]
impl Debug for BasePolicy
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for BasePolicy
[src]
impl Clone for BasePolicy
fn clone(&self) -> BasePolicy
[src]
fn clone(&self) -> BasePolicy
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Policy for BasePolicy
[src]
impl Policy for BasePolicy
fn priority(&self) -> &Priority
[src]
fn priority(&self) -> &Priority
Transaction priority.
fn consistency_level(&self) -> &ConsistencyLevel
[src]
fn consistency_level(&self) -> &ConsistencyLevel
How replicas should be consulted in read operations to provide the desired consistency guarantee. Read more
fn deadline(&self) -> Option<Instant>
[src]
fn deadline(&self) -> Option<Instant>
fn timeout(&self) -> Option<Duration>
[src]
fn timeout(&self) -> Option<Duration>
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
fn max_retries(&self) -> Option<usize>
[src]
fn max_retries(&self) -> Option<usize>
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
fn sleep_between_retries(&self) -> Option<Duration>
[src]
fn sleep_between_retries(&self) -> Option<Duration>
Time to sleep between retries. Set to zero to skip sleep. Default: 500ms.
Auto Trait Implementations
impl Send for BasePolicy
impl Send for BasePolicy
impl Sync for BasePolicy
impl Sync for BasePolicy