Class SyncConsistentHashFactory.Builder
- java.lang.Object
-
- org.infinispan.distribution.ch.impl.SyncConsistentHashFactory.Builder
-
- Direct Known Subclasses:
TopologyAwareSyncConsistentHashFactory.Builder
- Enclosing class:
- SyncConsistentHashFactory
protected static class SyncConsistentHashFactory.Builder extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected int
actualNumOwners
protected Map<Address,Float>
capacityFactors
protected org.infinispan.commons.hash.Hash
hashFunction
protected boolean
ignoreMaxSegments
protected int
numOwners
protected int
numSegments
protected List<Address>[]
segmentOwners
protected int
segmentSize
protected List<Address>
sortedMembers
protected OwnershipStatistics
stats
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
addBackupOwner(int segment, Address candidate)
protected void
addOwnerNoCheck(int segment, Address owner)
protected boolean
addPrimaryOwner(int segment, Address candidate)
protected boolean
canAddOwners(List<Address> owners)
protected float
computeTotalCapacity()
protected void
copyOwners()
protected void
doCopyOwners()
protected double
getExpectedOwnedSegments(Address node)
protected double
getExpectedPrimarySegments(Address node)
protected int
nextSegment(int segment)
protected int
normalizedHash(org.infinispan.commons.hash.Hash hashFunction, int hashcode)
protected void
populateExtraOwners(int numSegments)
protected void
populateOwners(int numSegments)
protected List<Address>
sort(List<Address> members, Map<Address,Float> capacityFactors)
-
-
-
Field Detail
-
hashFunction
protected final org.infinispan.commons.hash.Hash hashFunction
-
numOwners
protected final int numOwners
-
actualNumOwners
protected final int actualNumOwners
-
numSegments
protected final int numSegments
-
segmentSize
protected final int segmentSize
-
stats
protected final OwnershipStatistics stats
-
ignoreMaxSegments
protected boolean ignoreMaxSegments
-
-
Method Detail
-
addOwnerNoCheck
protected void addOwnerNoCheck(int segment, Address owner)
-
computeTotalCapacity
protected float computeTotalCapacity()
-
copyOwners
protected void copyOwners()
-
doCopyOwners
protected void doCopyOwners()
-
nextSegment
protected int nextSegment(int segment)
-
populateOwners
protected void populateOwners(int numSegments)
-
populateExtraOwners
protected void populateExtraOwners(int numSegments)
-
getExpectedPrimarySegments
protected double getExpectedPrimarySegments(Address node)
-
getExpectedOwnedSegments
protected double getExpectedOwnedSegments(Address node)
-
addPrimaryOwner
protected boolean addPrimaryOwner(int segment, Address candidate)
-
addBackupOwner
protected boolean addBackupOwner(int segment, Address candidate)
-
normalizedHash
protected int normalizedHash(org.infinispan.commons.hash.Hash hashFunction, int hashcode)
-
-