protected static class ScatteredConsistentHashFactory.Builder extends Object
Modifier and Type | Field and Description |
---|---|
protected Map<Address,Float> |
capacityFactors |
protected List<Address> |
members |
protected int |
modCount |
protected OwnershipStatistics |
stats |
Constructor and 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) |
Modifier and Type | Method and Description |
---|---|
void |
addPrimaryOwner(int segment,
Address newPrimaryOwner) |
ScatteredConsistentHash |
build() |
float |
getCapacityFactor(Address node) |
Map<Address,Float> |
getCapacityFactors() |
List<Address> |
getMembers() |
int |
getNumNodes() |
int |
getNumSegments() |
int |
getOwned(Address node) |
int |
getPrimaryOwned(Address node) |
Address |
getPrimaryOwner(int segment) |
void |
setRebalanced(boolean isRebalanced) |
protected final OwnershipStatistics stats
protected int modCount
public Builder(ScatteredConsistentHash baseCH, List<Address> actualMembers, Map<Address,Float> actualCapacityFactors)
public Builder(ScatteredConsistentHash baseCH)
public Builder(ScatteredConsistentHashFactory.Builder other)
public int getNumSegments()
public Address getPrimaryOwner(int segment)
public void addPrimaryOwner(int segment, Address newPrimaryOwner)
public ScatteredConsistentHash build()
public void setRebalanced(boolean isRebalanced)
public int getPrimaryOwned(Address node)
public int getOwned(Address node)
public int getNumNodes()
public float getCapacityFactor(Address node)
Copyright © 2021 JBoss by Red Hat. All rights reserved.