public class RandomPartitioner extends java.lang.Object implements IPartitioner
| Modifier and Type | Class and Description |
|---|---|
static class |
RandomPartitioner.BigIntegerToken |
| Modifier and Type | Field and Description |
|---|---|
static RandomPartitioner |
instance |
static java.math.BigInteger |
MAXIMUM |
static RandomPartitioner.BigIntegerToken |
MINIMUM |
static java.math.BigInteger |
ZERO |
| Constructor and Description |
|---|
RandomPartitioner() |
| 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.
|
RandomPartitioner.BigIntegerToken |
getMinimumToken() |
RandomPartitioner.BigIntegerToken |
getRandomToken() |
RandomPartitioner.BigIntegerToken |
getToken(java.nio.ByteBuffer key) |
Token.TokenFactory |
getTokenFactory() |
AbstractType<?> |
getTokenValidator() |
Token |
midpoint(Token ltoken,
Token rtoken)
Calculate a Token representing the approximate "middle" of the given
range.
|
boolean |
preservesOrder() |
public static final java.math.BigInteger ZERO
public static final RandomPartitioner.BigIntegerToken MINIMUM
public static final java.math.BigInteger MAXIMUM
public static final RandomPartitioner instance
public DecoratedKey decorateKey(java.nio.ByteBuffer key)
IPartitionerdecorateKey in interface IPartitionerkey - the raw, client-facing keypublic Token midpoint(Token ltoken, Token rtoken)
IPartitionermidpoint in interface IPartitionerpublic RandomPartitioner.BigIntegerToken getMinimumToken()
getMinimumToken in interface IPartitionerpublic RandomPartitioner.BigIntegerToken getRandomToken()
getRandomToken in interface IPartitionerpublic Token.TokenFactory getTokenFactory()
getTokenFactory in interface IPartitionerpublic boolean preservesOrder()
preservesOrder in interface IPartitionerpublic RandomPartitioner.BigIntegerToken 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 IPartitionerCopyright © 2015 The Apache Software Foundation