Struct aerospike::ClientPolicy [] [src]

pub struct ClientPolicy {
    pub user_password: Option<(String, String)>,
    pub timeout: Option<Duration>,
    pub idle_timeout: Option<Duration>,
    pub connection_pool_size_per_node: usize,
    pub fail_if_not_connected: bool,
    pub tend_interval: Duration,
    pub ip_map: Option<HashMap<String, String>>,
    pub use_services_alternate: bool,
    pub thread_pool_size: usize,
}

ClientPolicy encapsulates parameters for client policy command.

Fields

User authentication to cluster. Leave empty for clusters running without restricted access.

Initial host connection timeout in milliseconds. The timeout when opening a connection to the server host for the first time.

Connection idle timeout. Every time a connection is used, its idle deadline will be extended by this duration. When this deadline is reached, the connection will be closed and discarded from the connection pool.

Size of the Connection Queue cache.

Throw exception if host connection fails during addHost().

TendInterval determines interval for checking for cluster state changes. Minimum possible interval is 10 Milliseconds.

A IP translation table is used in cases where different clients use different server IP addresses. This may be necessary when using clients from both inside and outside a local area network. Default is no translation. The key is the IP address returned from friend info requests to other servers. The value is the real IP address used to connect to the server.

UseServicesAlternate determines if the client should use "services-alternate" instead of "services" in info request during cluster tending. "services-alternate" returns server configured external IP addresses that client uses to talk to nodes. "services-alternate" can be used in place of providing a client "ipMap". This feature is recommended instead of using the client-side IpMap above.

"services-alternate" is available with Aerospike Server versions >= 3.7.1.

Size of the thread pool used in scan and query commands. These commands are often sent to multiple server nodes in parallel threads. A thread pool improves performance because threads do not have to be created/destroyed for each command.

Methods

impl ClientPolicy
[src]

Set username and password to use when authenticating to the cluster.

Trait Implementations

impl Debug for ClientPolicy
[src]

Formats the value using the given formatter.

impl Clone for ClientPolicy
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Default for ClientPolicy
[src]

Returns the "default value" for a type. Read more