public class Murmur3Partitioner extends java.lang.Object implements IPartitioner
Modifier and Type | Class and Description |
---|---|
static class |
Murmur3Partitioner.LongToken |
Modifier and Type | Field and Description |
---|---|
static Murmur3Partitioner |
instance |
static long |
MAXIMUM |
static Murmur3Partitioner.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.
|
Murmur3Partitioner.LongToken |
getMinimumToken() |
Murmur3Partitioner.LongToken |
getRandomToken() |
Murmur3Partitioner.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.
|
boolean |
preservesOrder() |
public static final Murmur3Partitioner.LongToken MINIMUM
public static final long MAXIMUM
public static final Murmur3Partitioner instance
public DecoratedKey decorateKey(java.nio.ByteBuffer key)
IPartitioner
decorateKey
in interface IPartitioner
key
- the raw, client-facing keypublic Token midpoint(Token lToken, Token rToken)
IPartitioner
midpoint
in interface IPartitioner
public Murmur3Partitioner.LongToken getMinimumToken()
getMinimumToken
in interface IPartitioner
public Murmur3Partitioner.LongToken getToken(java.nio.ByteBuffer key)
getToken
in interface IPartitioner
public Murmur3Partitioner.LongToken getRandomToken()
getRandomToken
in interface IPartitioner
public boolean preservesOrder()
preservesOrder
in interface IPartitioner
public java.util.Map<Token,java.lang.Float> describeOwnership(java.util.List<Token> sortedTokens)
IPartitioner
describeOwnership
in interface IPartitioner
sortedTokens
- a sorted List of Tokenspublic Token.TokenFactory getTokenFactory()
getTokenFactory
in interface IPartitioner
public AbstractType<?> getTokenValidator()
getTokenValidator
in interface IPartitioner
Copyright © 2019 The Apache Software Foundation