Struct aerospike::policy::BasePolicy
source · 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>,
pub filter_expression: Option<FilterExpression>,
}
Expand description
Common parameters shared by all policy types.
Fields§
§priority: Priority
Priority of request relative to other transactions. Currently, only used for scans. This is deprected for Scan/Query commands and will not be sent to the server.
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.
filter_expression: Option<FilterExpression>
Optional FilterExpression
Implementations§
source§impl BasePolicy
impl BasePolicy
sourcepub const fn filter_expression(&self) -> &Option<FilterExpression>
pub const fn filter_expression(&self) -> &Option<FilterExpression>
Get the Optional Filter Expression
Trait Implementations§
source§impl Clone for BasePolicy
impl Clone for BasePolicy
source§fn clone(&self) -> BasePolicy
fn clone(&self) -> BasePolicy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BasePolicy
impl Debug for BasePolicy
source§impl Policy for BasePolicy
impl Policy for BasePolicy
source§fn timeout(&self) -> Option<Duration>
fn timeout(&self) -> Option<Duration>
source§fn max_retries(&self) -> Option<usize>
fn max_retries(&self) -> Option<usize>
max_retries
is exceeded, the abort will occur even if
the timeout has not yet been exceeded.