Class AbstractConsistentHashFactory<CH extends ConsistentHash>

java.lang.Object
org.infinispan.distribution.ch.impl.AbstractConsistentHashFactory<CH>
All Implemented Interfaces:
ConsistentHashFactory<CH>
Direct Known Subclasses:
DefaultConsistentHashFactory, ScatteredConsistentHashFactory

public abstract class AbstractConsistentHashFactory<CH extends ConsistentHash> extends Object implements ConsistentHashFactory<CH>
Author:
Radim Vansa <rvansa@redhat.com>
  • Constructor Details

    • AbstractConsistentHashFactory

      public AbstractConsistentHashFactory()
  • Method Details

    • checkCapacityFactors

      protected void checkCapacityFactors(List<Address> members, Map<Address,Float> capacityFactors)
    • findWorstPrimaryOwner

      protected Address findWorstPrimaryOwner(org.infinispan.distribution.ch.impl.AbstractConsistentHashFactory.Builder builder, List<Address> nodes)
      Returns:
      The worst primary owner, or null if the remaining nodes own 0 segments.
    • findNewPrimaryOwner

      protected Address findNewPrimaryOwner(org.infinispan.distribution.ch.impl.AbstractConsistentHashFactory.Builder builder, Collection<Address> candidates, Address primaryOwner)
      Returns:
      The candidate with the worst primary-owned segments/capacity ratio that is also not in the excludes list.