public class OrderPreservingPartitioner extends java.lang.Object implements IPartitioner
| Modifier and Type | Class and Description |
|---|---|
static class |
OrderPreservingPartitioner.StringToken |
| Modifier and Type | Field and Description |
|---|---|
static java.math.BigInteger |
CHAR_MASK |
static OrderPreservingPartitioner |
instance |
static OrderPreservingPartitioner.StringToken |
MINIMUM |
| Constructor and Description |
|---|
OrderPreservingPartitioner() |
| 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.
|
OrderPreservingPartitioner.StringToken |
getMinimumToken() |
OrderPreservingPartitioner.StringToken |
getRandomToken() |
OrderPreservingPartitioner.StringToken |
getToken(java.nio.ByteBuffer key) |
Token.TokenFactory |
getTokenFactory() |
AbstractType<?> |
getTokenValidator() |
OrderPreservingPartitioner.StringToken |
midpoint(Token ltoken,
Token rtoken)
Calculate a Token representing the approximate "middle" of the given
range.
|
AbstractType<?> |
partitionOrdering()
Abstract type that orders the same way as DecoratedKeys provided by this partitioner.
|
boolean |
preservesOrder() |
public static final OrderPreservingPartitioner.StringToken MINIMUM
public static final java.math.BigInteger CHAR_MASK
public static final OrderPreservingPartitioner instance
public DecoratedKey decorateKey(java.nio.ByteBuffer key)
IPartitionerdecorateKey in interface IPartitionerkey - the raw, client-facing keypublic OrderPreservingPartitioner.StringToken midpoint(Token ltoken, Token rtoken)
IPartitionermidpoint in interface IPartitionerpublic OrderPreservingPartitioner.StringToken getMinimumToken()
getMinimumToken in interface IPartitionerpublic OrderPreservingPartitioner.StringToken getRandomToken()
getRandomToken in interface IPartitionerpublic Token.TokenFactory getTokenFactory()
getTokenFactory in interface IPartitionerpublic boolean preservesOrder()
preservesOrder in interface IPartitionerpublic OrderPreservingPartitioner.StringToken getToken(java.nio.ByteBuffer key)
getToken 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 IPartitionerpublic AbstractType<?> partitionOrdering()
IPartitionerpartitionOrdering in interface IPartitionerCopyright © 2016 The Apache Software Foundation