Class DistributionManagerImpl

  • All Implemented Interfaces:
    DistributionManager

    @MBean(objectName="DistributionManager",
           description="Component that handles distribution of content across a cluster")
    public class DistributionManagerImpl
    extends Object
    implements DistributionManager
    The default distribution manager implementation
    Since:
    4.0
    Author:
    Manik Surtani, Vladimir Blagojevic, Mircea.Markus@jboss.com, Bela Ban, Dan Berindei <dan@infinispan.org>, anistor@redhat.com
    • Constructor Detail

      • DistributionManagerImpl

        public DistributionManagerImpl()
    • Method Detail

      • isAffectedByRehash

        @ManagedOperation(description="Determines whether a given key is affected by an ongoing rehash, if any.",
                          displayName="Could key be affected by rehash?")
        public boolean isAffectedByRehash​(@Parameter(name="key",description="Key to check")
                                          Object key)
        Description copied from interface: DistributionManager
        Tests whether a given key is affected by a rehash that may be in progress. If no rehash is in progress, this method returns false. Helps determine whether additional steps are necessary in handling an operation with a given key.
        Specified by:
        isAffectedByRehash in interface DistributionManager
        Parameters:
        key - key to test
        Returns:
        whether a key is affected by a rehash
      • isRehashInProgress

        public boolean isRehashInProgress()
        Tests whether a rehash is in progress
        Specified by:
        isRehashInProgress in interface DistributionManager
        Returns:
        true if a rehash is in progress, false otherwise
      • isJoinComplete

        public boolean isJoinComplete()
        Description copied from interface: DistributionManager
        Tests whether the current instance has completed joining the cluster
        Specified by:
        isJoinComplete in interface DistributionManager
        Returns:
        true if join is in progress, false otherwise
      • isLocatedLocally

        @ManagedOperation(description="Tells you whether a given key would be written to this instance of the cache according to the consistent hashing algorithm. Only works with String keys.",
                          displayName="Is key local?")
        public boolean isLocatedLocally​(@Parameter(name="key",description="Key to query")
                                        String key)
      • locateKey

        @ManagedOperation(description="Shows the addresses of the nodes where a write operation would store the entry associated with the specified key. Only works with String keys.",
                          displayName="Locate key")
        public List<String> locateKey​(@Parameter(name="key",description="Key to locate")
                                      String key)