public abstract class AbstractByteOrderedPartitioner
extends java.lang.Object
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 |
getTokenFactory() |
AbstractType<?> |
getTokenValidator() |
BytesToken |
midpoint(Token lt,
Token rt)
Calculate a Token representing the approximate "middle" of the given
range.
|
<R extends RingPosition<R>> |
minValue(java.lang.Class<R> klass) |
boolean |
preservesOrder() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHeapSizeOf
public static final BytesToken MINIMUM
public static final java.math.BigInteger BYTE_MASK
public DecoratedKey decorateKey(java.nio.ByteBuffer key)
IPartitioner
key
- the raw, client-facing keypublic BytesToken midpoint(Token lt, Token rt)
IPartitioner
public BytesToken getMinimumToken()
public BytesToken getRandomToken()
public Token.TokenFactory 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)
IPartitioner
sortedTokens
- a sorted List of Tokenspublic AbstractType<?> getTokenValidator()
public <R extends RingPosition<R>> R minValue(java.lang.Class<R> klass)
minValue
in interface IPartitioner
Copyright © 2016 The Apache Software Foundation