public interface TokenGenerator
Modifier and Type | Method and Description |
---|---|
java.math.BigInteger |
getTokenForReplacementNode(java.math.BigInteger oldToken) |
java.util.Set<java.math.BigInteger> |
getTokensForReplacementNode(java.util.Set<java.math.BigInteger> oldTokens) |
void |
growingCluster(int numNewNodes)
Indicates that we are starting a new cluster of the given number of nodes,
so expect that number of consecutive calls to
newToken() . |
java.math.BigInteger |
max() |
java.math.BigInteger |
min() |
java.math.BigInteger |
newToken() |
java.math.BigInteger |
range() |
void |
refresh(java.util.Set<java.math.BigInteger> currentNodes) |
void |
setOrigin(java.math.BigInteger shift) |
void |
shrinkingCluster(java.util.Set<java.math.BigInteger> nodesToRemove) |
java.math.BigInteger max()
java.math.BigInteger min()
java.math.BigInteger range()
void setOrigin(java.math.BigInteger shift)
java.math.BigInteger newToken()
java.math.BigInteger getTokenForReplacementNode(java.math.BigInteger oldToken)
java.util.Set<java.math.BigInteger> getTokensForReplacementNode(java.util.Set<java.math.BigInteger> oldTokens)
void growingCluster(int numNewNodes)
newToken()
.numNewNodes
- void shrinkingCluster(java.util.Set<java.math.BigInteger> nodesToRemove)
void refresh(java.util.Set<java.math.BigInteger> currentNodes)