Class CacheKeyDistribution

  • All Implemented Interfaces:
    KeyDistribution

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

      • CacheKeyDistribution

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

      • 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