public class Murmur3Partitioner
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static long |
MAXIMUM |
static LongToken |
MINIMUM |
Constructor and Description |
---|
Murmur3Partitioner() |
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.
|
long |
getHeapSizeOf(Token token) |
LongToken |
getMinimumToken() |
LongToken |
getRandomToken() |
LongToken |
getToken(java.nio.ByteBuffer key)
Generate the token of a key.
|
Token.TokenFactory |
getTokenFactory() |
AbstractType<?> |
getTokenValidator() |
Token |
midpoint(Token lToken,
Token rToken)
Calculate a Token representing the approximate "middle" of the given
range.
|
<R extends RingPosition<R>> |
minValue(java.lang.Class<R> klass) |
boolean |
preservesOrder() |
public static final LongToken MINIMUM
public static final long MAXIMUM
public DecoratedKey decorateKey(java.nio.ByteBuffer key)
IPartitioner
key
- the raw, client-facing keypublic Token midpoint(Token lToken, Token rToken)
IPartitioner
public LongToken getMinimumToken()
public LongToken getToken(java.nio.ByteBuffer key)
public long getHeapSizeOf(Token token)
public LongToken getRandomToken()
public boolean preservesOrder()
public java.util.Map<Token,java.lang.Float> describeOwnership(java.util.List<Token> sortedTokens)
IPartitioner
sortedTokens
- a sorted List of Tokenspublic Token.TokenFactory getTokenFactory()
public AbstractType<?> getTokenValidator()
public <R extends RingPosition<R>> R minValue(java.lang.Class<R> klass)
minValue
in interface IPartitioner
Copyright © 2017 The Apache Software Foundation