public abstract class AbstractByteOrderedPartitioner extends AbstractPartitioner<BytesToken>
| Modifier and Type | Field and Description |
|---|---|
static java.math.BigInteger |
BYTE_MASK |
static BytesToken |
MINIMUM |
| Constructor and Description |
|---|
AbstractByteOrderedPartitioner() |
| 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.
|
BytesToken |
getMinimumToken() |
BytesToken |
getRandomToken() |
abstract BytesToken |
getToken(java.nio.ByteBuffer key) |
Token.TokenFactory<byte[]> |
getTokenFactory() |
AbstractType<?> |
getTokenValidator() |
BytesToken |
midpoint(Token ltoken,
Token rtoken)
Calculate a Token representing the approximate "middle" of the given
range.
|
boolean |
preservesOrder() |
minValuepublic static final BytesToken MINIMUM
public static final java.math.BigInteger BYTE_MASK
public DecoratedKey decorateKey(java.nio.ByteBuffer key)
IPartitionerkey - the raw, client-facing keypublic BytesToken midpoint(Token ltoken, Token rtoken)
IPartitionerpublic BytesToken getMinimumToken()
public BytesToken getRandomToken()
public Token.TokenFactory<byte[]> getTokenFactory()
public boolean preservesOrder()
public abstract BytesToken getToken(java.nio.ByteBuffer key)
public java.util.Map<Token,java.lang.Float> describeOwnership(java.util.List<Token> sortedTokens)
IPartitionersortedTokens - a sorted List of Tokenspublic AbstractType<?> getTokenValidator()
Copyright © 2015 The Apache Software Foundation