public class ByteOrderedPartitioner extends java.lang.Object implements IPartitioner
| Modifier and Type | Class and Description |
|---|---|
static class |
ByteOrderedPartitioner.BytesToken |
| Modifier and Type | Field and Description |
|---|---|
static java.math.BigInteger |
BYTE_MASK |
static ByteOrderedPartitioner |
instance |
static ByteOrderedPartitioner.BytesToken |
MINIMUM |
| Constructor and Description |
|---|
ByteOrderedPartitioner() |
| 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.
|
ByteOrderedPartitioner.BytesToken |
getMinimumToken() |
ByteOrderedPartitioner.BytesToken |
getRandomToken() |
ByteOrderedPartitioner.BytesToken |
getToken(java.nio.ByteBuffer key) |
Token.TokenFactory |
getTokenFactory() |
AbstractType<?> |
getTokenValidator() |
ByteOrderedPartitioner.BytesToken |
midpoint(Token lt,
Token rt)
Calculate a Token representing the approximate "middle" of the given
range.
|
boolean |
preservesOrder() |
public static final ByteOrderedPartitioner.BytesToken MINIMUM
public static final java.math.BigInteger BYTE_MASK
public static final ByteOrderedPartitioner instance
public ByteOrderedPartitioner.BytesToken getToken(java.nio.ByteBuffer key)
getToken in interface IPartitionerpublic DecoratedKey decorateKey(java.nio.ByteBuffer key)
IPartitionerdecorateKey in interface IPartitionerkey - the raw, client-facing keypublic ByteOrderedPartitioner.BytesToken midpoint(Token lt, Token rt)
IPartitionermidpoint in interface IPartitionerpublic ByteOrderedPartitioner.BytesToken getMinimumToken()
getMinimumToken in interface IPartitionerpublic ByteOrderedPartitioner.BytesToken getRandomToken()
getRandomToken in interface IPartitionerpublic Token.TokenFactory getTokenFactory()
getTokenFactory in interface IPartitionerpublic boolean preservesOrder()
preservesOrder in interface IPartitionerpublic java.util.Map<Token,java.lang.Float> describeOwnership(java.util.List<Token> sortedTokens)
IPartitionerdescribeOwnership in interface IPartitionersortedTokens - a sorted List of Tokenspublic AbstractType<?> getTokenValidator()
getTokenValidator in interface IPartitionerCopyright © 2015 The Apache Software Foundation