public interface IPartitioner<T extends Token>
Modifier and Type | Method and Description |
---|---|
DecoratedKey |
decorateKey(java.nio.ByteBuffer key)
Transform key to object representation of the on-disk format.
|
java.util.Map<Token,java.lang.Float> |
describeOwnership(java.util.List<Token> sortedTokens)
Calculate the deltas between tokens in the ring in order to compare
relative sizes.
|
T |
getMinimumToken() |
T |
getRandomToken() |
T |
getToken(java.nio.ByteBuffer key) |
Token.TokenFactory |
getTokenFactory() |
AbstractType<?> |
getTokenValidator() |
Token |
midpoint(Token left,
Token right)
Calculate a Token representing the approximate "middle" of the given
range.
|
<R extends RingPosition> |
minValue(java.lang.Class<R> klass) |
boolean |
preservesOrder() |
DecoratedKey decorateKey(java.nio.ByteBuffer key)
key
- the raw, client-facing keyToken midpoint(Token left, Token right)
T getMinimumToken()
T getToken(java.nio.ByteBuffer key)
T getRandomToken()
Token.TokenFactory getTokenFactory()
boolean preservesOrder()
java.util.Map<Token,java.lang.Float> describeOwnership(java.util.List<Token> sortedTokens)
sortedTokens
- a sorted List of TokensAbstractType<?> getTokenValidator()
<R extends RingPosition> R minValue(java.lang.Class<R> klass)
Copyright © 2013 The Apache Software Foundation