public static class DefaultConsistentHashFactory.Builder extends Object
Constructor and Description |
---|
DefaultConsistentHashFactory.Builder(DefaultConsistentHash baseCH) |
DefaultConsistentHashFactory.Builder(DefaultConsistentHashFactory.Builder other) |
DefaultConsistentHashFactory.Builder(DefaultConsistentHash baseCH,
List<Address> actualMembers) |
DefaultConsistentHashFactory.Builder(int numOwners,
int numSegments,
List<Address> members) |
Modifier and Type | Method and Description |
---|---|
boolean |
addOwner(int segment,
Address owner) |
boolean |
addOwners(int segment,
Collection<Address> newOwners) |
DefaultConsistentHash |
build(Hash hashFunction) |
int |
getActualNumOwners() |
List<Address> |
getBackupOwners(int segment) |
List<Address> |
getMembers() |
int |
getNumNodes() |
int |
getNumSegments() |
int |
getOwned(Address node) |
List<Address> |
getOwners(int segment) |
Address |
getPrimaryOwner(int segment) |
boolean |
removeOwner(int segment,
Address owner) |
void |
replacePrimaryOwner(int segment,
Address newPrimaryOwner) |
public DefaultConsistentHashFactory.Builder(int numOwners, int numSegments, List<Address> members)
public DefaultConsistentHashFactory.Builder(DefaultConsistentHash baseCH, List<Address> actualMembers)
public DefaultConsistentHashFactory.Builder(DefaultConsistentHash baseCH)
public DefaultConsistentHashFactory.Builder(DefaultConsistentHashFactory.Builder other)
public int getActualNumOwners()
public int getNumSegments()
public int getNumNodes()
public Address getPrimaryOwner(int segment)
public boolean addOwner(int segment, Address owner)
public boolean addOwners(int segment, Collection<Address> newOwners)
public boolean removeOwner(int segment, Address owner)
public void replacePrimaryOwner(int segment, Address newPrimaryOwner)
public DefaultConsistentHash build(Hash hashFunction)
public int getOwned(Address node)
Copyright © 2017 JBoss, a division of Red Hat. All Rights Reserved.