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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected Address
findNewPrimaryOwner
(org.infinispan.distribution.ch.impl.AbstractConsistentHashFactory.Builder builder, Collection<Address> candidates, Address primaryOwner) protected Address
findWorstPrimaryOwner
(org.infinispan.distribution.ch.impl.AbstractConsistentHashFactory.Builder builder, List<Address> nodes) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.infinispan.distribution.ch.ConsistentHashFactory
create, create, fromPersistentState, rebalance, union, updateMembers
-
Constructor Details
-
AbstractConsistentHashFactory
public AbstractConsistentHashFactory()
-
-
Method Details
-
checkCapacityFactors
-
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.
-