Interface KeyDistribution

All Known Implementing Classes:
ConsistentHashKeyDistribution

public interface KeyDistribution
Provides key distribution functions.
Author:
Paul Ferraro
  • Method Summary

    Modifier and Type
    Method
    Description
    forCache(org.infinispan.Cache<?,?> cache)
     
    forConsistentHash(org.infinispan.Cache<?,?> cache, org.infinispan.distribution.ch.ConsistentHash hash)
     
    List<org.infinispan.remoting.transport.Address>
    Returns the owners of the specified key.
    org.infinispan.remoting.transport.Address
    Returns the primary owner of the specified key.
  • Method Details

    • getPrimaryOwner

      org.infinispan.remoting.transport.Address getPrimaryOwner(Object key)
      Returns the primary owner of the specified key.
      Parameters:
      key - a cache key
      Returns:
      the address of the primary owner
    • getOwners

      List<org.infinispan.remoting.transport.Address> getOwners(Object key)
      Returns the owners of the specified key.
      Parameters:
      key - a cache key
      Returns:
      a list of addresses for each owner
    • forCache

      static KeyDistribution forCache(org.infinispan.Cache<?,?> cache)
    • forConsistentHash

      static KeyDistribution forConsistentHash(org.infinispan.Cache<?,?> cache, org.infinispan.distribution.ch.ConsistentHash hash)