Class ConsistentHasher


  • public class ConsistentHasher
    extends Object
    Distributes objects across a set of node keys using consistent hashing. See https://en.wikipedia.org/wiki/Consistent_hashing Not thread-safe.
    • Constructor Detail

      • ConsistentHasher

        public ConsistentHasher​(com.google.common.hash.HashFunction hashFunction)
    • Method Detail

      • updateKeys

        public void updateKeys​(Set<String> currentKeys)
      • findKey

        public String findKey​(byte[] obj)