Struct aerospike::policy::QueryPolicy
source · pub struct QueryPolicy {
pub base_policy: BasePolicy,
pub max_concurrent_nodes: usize,
pub record_queue_size: usize,
pub fail_on_cluster_change: bool,
pub filter_expression: Option<FilterExpression>,
}
Expand description
QueryPolicy
encapsulates parameters for query operations.
Fields§
§base_policy: BasePolicy
Base policy instance
max_concurrent_nodes: usize
Maximum number of concurrent requests to server nodes at any point in time. If there are 16
nodes in the cluster and max_concurrent_nodes
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.
record_queue_size: usize
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.
fail_on_cluster_change: bool
Terminate query if cluster is in fluctuating state.
filter_expression: Option<FilterExpression>
Optional Filter Expression
Implementations§
source§impl QueryPolicy
impl QueryPolicy
sourcepub const fn filter_expression(&self) -> &Option<FilterExpression>
pub const fn filter_expression(&self) -> &Option<FilterExpression>
Get the current Filter Expression
Trait Implementations§
source§impl Clone for QueryPolicy
impl Clone for QueryPolicy
source§fn clone(&self) -> QueryPolicy
fn clone(&self) -> QueryPolicy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for QueryPolicy
impl Debug for QueryPolicy
Auto Trait Implementations§
impl RefUnwindSafe for QueryPolicy
impl Send for QueryPolicy
impl Sync for QueryPolicy
impl Unpin for QueryPolicy
impl UnwindSafe for QueryPolicy
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Policy for Twhere
T: PolicyLike,
impl<T> Policy for Twhere T: PolicyLike,
source§fn consistency_level(&self) -> &ConsistencyLevel
fn consistency_level(&self) -> &ConsistencyLevel
fn deadline(&self) -> Option<Instant>
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.