Class CacheKeyDistribution

java.lang.Object
org.wildfly.clustering.infinispan.distribution.CacheKeyDistribution
All Implemented Interfaces:
KeyDistribution

public class CacheKeyDistribution extends Object implements KeyDistribution
Key distribution appropriate for any cache mode.
Author:
Paul Ferraro
  • Constructor Details

    • CacheKeyDistribution

      public CacheKeyDistribution(org.infinispan.Cache<?,?> cache)
  • Method Details

    • getPrimaryOwner

      public org.infinispan.remoting.transport.Address getPrimaryOwner(Object key)
      Description copied from interface: KeyDistribution
      Returns the primary owner of the specified key.
      Specified by:
      getPrimaryOwner in interface KeyDistribution
      Parameters:
      key - a cache key
      Returns:
      the address of the primary owner
    • getOwners

      public List<org.infinispan.remoting.transport.Address> getOwners(Object key)
      Description copied from interface: KeyDistribution
      Returns the owners of the specified key.
      Specified by:
      getOwners in interface KeyDistribution
      Parameters:
      key - a cache key
      Returns:
      a list of addresses for each owner