Struct cdrs::cluster::NodeTcpConfigBuilder [−][src]
pub struct NodeTcpConfigBuilder<'a, A> { /* fields omitted */ }
Builder structure that helps to configure TCP connection for node.
Methods
impl<'a, A: Authenticator + Sized> NodeTcpConfigBuilder<'a, A>
[src]
impl<'a, A: Authenticator + Sized> NodeTcpConfigBuilder<'a, A>
pub fn new<'b>(addr: &'b str, authenticator: A) -> NodeTcpConfigBuilder<'b, A>
[src]
pub fn new<'b>(addr: &'b str, authenticator: A) -> NodeTcpConfigBuilder<'b, A>
NodeTcpConfigBuilder
constructor function. It receivesthread::spawn(move || {
- node socket address as a string
- authenticator
pub fn max_size(self, size: u32) -> Self
[src]
pub fn max_size(self, size: u32) -> Self
Sets the maximum number of connections managed by the pool. Defaults to 10.
pub fn min_idle(self, min_idle: Option<u32>) -> Self
[src]
pub fn min_idle(self, min_idle: Option<u32>) -> Self
Sets the minimum idle connection count maintained by the pool.
If set, the pool will try to maintain at least this many idle
connections at all times, while respecting the value of max_size
.
Defaults to None (equivalent to the value of max_size
).
pub fn max_lifetime(self, max_lifetime: Option<Duration>) -> Self
[src]
pub fn max_lifetime(self, max_lifetime: Option<Duration>) -> Self
Sets the maximum lifetime of connections in the pool. If set, connections will be closed after existing for at most 30 seconds beyond this duration. If a connection reaches its maximum lifetime while checked out it will be closed when it is returned to the pool. Defaults to 30 minutes.
pub fn idle_timeout(self, idle_timeout: Option<Duration>) -> Self
[src]
pub fn idle_timeout(self, idle_timeout: Option<Duration>) -> Self
Sets the idle timeout used by the pool. If set, connections will be closed after sitting idle for at most 30 seconds beyond this duration. Defaults to 10 minutes.
pub fn connection_timeout(self, connection_timeout: Duration) -> Self
[src]
pub fn connection_timeout(self, connection_timeout: Duration) -> Self
Sets the connection timeout used by the pool. Defaults to 30 seconds.
pub fn authenticator(self, authenticator: A) -> Self
[src]
pub fn authenticator(self, authenticator: A) -> Self
Sets new authenticator.
pub fn build(self) -> NodeTcpConfig<'a, A>
[src]
pub fn build(self) -> NodeTcpConfig<'a, A>
Finalizes building process and returns NodeSslConfig
Auto Trait Implementations
impl<'a, A> Send for NodeTcpConfigBuilder<'a, A> where
A: Send,
impl<'a, A> Send for NodeTcpConfigBuilder<'a, A> where
A: Send,
impl<'a, A> Sync for NodeTcpConfigBuilder<'a, A> where
A: Sync,
impl<'a, A> Sync for NodeTcpConfigBuilder<'a, A> where
A: Sync,