[−][src]Enum reool::config::NodePoolStrategy
Determines which kind of pool to create.
2 kinds of pools can be created: A shared pool which will have connections to possibly multiple nodes or a pool with multiple sub pools which will all connect to one node only.
If there is only 1 node to connect to NodePoolStrategy::SharedPool
will always
be used which is also the default.
NodePoolStrategy::SharedPool
The pool created will create connections to each nose in a round robin fashion. Since connections can also be closed it is never really known how many connections the pool has to a specific node. Nevertheless the connections should be evenly distributed under normal circumstances.
When a node fails the connections to that node will be replaced by connections to the other nodes once the pool is recreating connections (e.g. after a connection caused an error).
When pinged it is not certain which od the nodes in the pool is getting pinged.
In configurations or when using FromStr
this value is created from the
string shared-pool
.
NodePoolStrategy::PoolPerNode
This pool can only be created if there are more than one node. Each of the pools within the resulting pool will be connected to a single node. When checking out a connection the checkout will be done in a round robin fashion and the next pool will be tried if a pool has no connections left.
When pinged it is exactly known which host is pinged and it is even guaranteed that all of the hosts will get pinged.
In configurations or when using FromStr
this value is created from the
string pool-per-node
.
Variants
There will only be a single pool and all connections to maybe different nodes will share the pool
Create a pool that contains connection pools where each pool is connected to one node only
Trait Implementations
impl Clone for NodePoolStrategy
[src]
fn clone(&self) -> NodePoolStrategy
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for NodePoolStrategy
[src]
impl Default for NodePoolStrategy
[src]
impl Eq for NodePoolStrategy
[src]
impl PartialEq<NodePoolStrategy> for NodePoolStrategy
[src]
fn eq(&self, other: &NodePoolStrategy) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl Debug for NodePoolStrategy
[src]
impl FromStr for NodePoolStrategy
[src]
type Err = ParseNodesStrategyError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl StructuralPartialEq for NodePoolStrategy
[src]
impl StructuralEq for NodePoolStrategy
[src]
Auto Trait Implementations
impl Send for NodePoolStrategy
impl Sync for NodePoolStrategy
impl Unpin for NodePoolStrategy
impl UnwindSafe for NodePoolStrategy
impl RefUnwindSafe for NodePoolStrategy
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,