Class ReplCache.ConsistentHashFunction<K>

java.lang.Object
org.jgroups.blocks.ReplCache.ConsistentHashFunction<K>
All Implemented Interfaces:
ReplCache.HashFunction<K>
Enclosing class:
ReplCache<K,V>

public static class ReplCache.ConsistentHashFunction<K> extends Object implements ReplCache.HashFunction<K>
  • Field Details

  • Constructor Details

    • ConsistentHashFunction

      public ConsistentHashFunction()
  • Method Details

    • hash

      public List<Address> hash(K key, short replication_count)
      Description copied from interface: ReplCache.HashFunction
      Function that, given a key and a replication count, returns replication_count number of different addresses of nodes.
      Specified by:
      hash in interface ReplCache.HashFunction<K>
      Parameters:
      key -
      replication_count -
      Returns:
    • installNodes

      public void installNodes(List<Address> new_nodes)
      Description copied from interface: ReplCache.HashFunction
      When the topology changes, this method will be called. Implementations will typically cache the node list
      Specified by:
      installNodes in interface ReplCache.HashFunction<K>
      Parameters:
      new_nodes -