Struct consist::HashRing [] [src]

pub struct HashRing<B: Hash> { /* fields omitted */ }

HashRing is a type that tracks a set of buckets corresponding to a collection of resources, usually servers. Items are hashed to these buckets in such a way that few items change their bucket mapping when one is eliminated.

Methods

impl<B> HashRing<B> where
    B: Hash
[src]

Get a new HashRing.

Adds the specified bucket to the hash ring.

Finds the corresponding bucket for this item.

Eliminate a bucket from the ring. All items mapped to this bucket will be mapped to the next bucket in hash order (with wraparound). Returns true if removal is successful, or false if the removal has no effect.