[][src]Struct reool::RedisPool

pub struct RedisPool<T: Poolable = ConnectionFlavour> { /* fields omitted */ }

A pool to one or more Redis instances.

This is the core type of this library.

Overview

Each RedisPool consist of one or more sub pools whereas each sub pool is only ever connected to one Redis node.

So the number of sub pools is usually the number of nodes to connect to. Furthermore the number of sub pools can be increased via the configuration.

Reool uses a stream to enqueue checkouts. Furthermore the number of buffered checkout requests is always limited. Having multiple sub pools will increase the number of checkout requests that can be enqueued.

When having more that one sub pool Reool will retry checkout attempts on different sub pools.

Methods

impl RedisPool[src]

pub fn builder() -> Builder[src]

impl<T: Poolable> RedisPool<T>[src]

pub fn no_pool() -> Self[src]

pub fn check_out_default(&self) -> Checkout<T>[src]

Checkout a new connection and if the request has to be enqueued use a timeout as defined by the pool as a default.

pub fn check_out<M: Into<CheckoutMode>>(&self, mode: M) -> Checkout<T>[src]

Checkout a new connection and choose whether to wait for a connection or not as defined by the CheckoutMode.

pub fn connected_to(&self) -> Vec<String>[src]

pub fn state(&self) -> PoolState[src]

pub fn ping<TO: Into<Timeout>>(
    &self,
    timeout: TO
) -> impl Future<Item = Vec<Ping>, Error = ()> + Send
[src]

Ping all the nodes which this pool is connected to.

timeout is the maximum time allowed for a ping.

This method only fails with () if the underlying connection does not support pinging. All other errors will be contained in the returned Ping struct.

Trait Implementations

impl<T: Poolable> Clone for RedisPool<T>[src]

Auto Trait Implementations

impl<T> Send for RedisPool<T>

impl<T> Sync for RedisPool<T>

impl<T> Unpin for RedisPool<T>

impl<T = ConnectionFlavour> !UnwindSafe for RedisPool<T>

impl<T = ConnectionFlavour> !RefUnwindSafe for RedisPool<T>

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<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 = !

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>,