[][src]Enum reool::config::NodePoolStrategy

pub enum NodePoolStrategy {
    SharedPool,
    PoolPerNode,
}

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

SharedPool

There will only be a single pool and all connections to maybe different nodes will share the pool

PoolPerNode

Create a pool that contains connection pools where each pool is connected to one node only

Trait Implementations

impl Clone for NodePoolStrategy[src]

impl Copy for NodePoolStrategy[src]

impl Default for NodePoolStrategy[src]

impl Eq for NodePoolStrategy[src]

impl PartialEq<NodePoolStrategy> for NodePoolStrategy[src]

impl Debug for NodePoolStrategy[src]

impl FromStr for NodePoolStrategy[src]

type Err = ParseNodesStrategyError

The associated error which can be returned from parsing.

impl StructuralPartialEq for NodePoolStrategy[src]

impl StructuralEq for NodePoolStrategy[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,