Class ScatteredConsistentHashFactory.Builder
- java.lang.Object
-
- org.infinispan.distribution.ch.impl.ScatteredConsistentHashFactory.Builder
-
- Enclosing class:
- ScatteredConsistentHashFactory
protected static class ScatteredConsistentHashFactory.Builder extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<Address,Float>capacityFactorsprotected List<Address>membersprotected intmodCountprotected OwnershipStatisticsstats
-
Constructor Summary
Constructors Constructor Description Builder(int numSegments, List<Address> members, Map<Address,Float> capacityFactors)Builder(ScatteredConsistentHash baseCH)Builder(ScatteredConsistentHashFactory.Builder other)Builder(ScatteredConsistentHash baseCH, List<Address> actualMembers, Map<Address,Float> actualCapacityFactors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPrimaryOwner(int segment, Address newPrimaryOwner)ScatteredConsistentHashbuild()floatgetCapacityFactor(Address node)Map<Address,Float>getCapacityFactors()List<Address>getMembers()intgetNumNodes()intgetNumSegments()intgetOwned(Address node)intgetPrimaryOwned(Address node)AddressgetPrimaryOwner(int segment)voidsetRebalanced(boolean isRebalanced)
-
-
-
Constructor Detail
-
Builder
public Builder(int numSegments, List<Address> members, Map<Address,Float> capacityFactors)
-
Builder
public Builder(ScatteredConsistentHash baseCH, List<Address> actualMembers, Map<Address,Float> actualCapacityFactors)
-
Builder
public Builder(ScatteredConsistentHash baseCH)
-
Builder
public Builder(ScatteredConsistentHashFactory.Builder other)
-
-
Method Detail
-
getNumSegments
public int getNumSegments()
-
getPrimaryOwner
public Address getPrimaryOwner(int segment)
-
addPrimaryOwner
public void addPrimaryOwner(int segment, Address newPrimaryOwner)
-
build
public ScatteredConsistentHash build()
-
setRebalanced
public void setRebalanced(boolean isRebalanced)
-
getPrimaryOwned
public int getPrimaryOwned(Address node)
-
getOwned
public int getOwned(Address node)
-
getNumNodes
public int getNumNodes()
-
getCapacityFactor
public float getCapacityFactor(Address node)
-
-