public interface IPartitioner
| 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. | 
| default Token | getMaximumToken()The biggest token for this partitioner, unlike getMinimumToken, this token is actually used and users wanting to
 include all tokens need to do getMaximumToken().maxKeyBound()
 Not implemented for the ordered partitioners | 
| Token | getMinimumToken() | 
| Token | getRandomToken() | 
| Token | getRandomToken(java.util.Random random) | 
| Token | getToken(java.nio.ByteBuffer key) | 
| Token.TokenFactory | getTokenFactory() | 
| AbstractType<?> | getTokenValidator() | 
| Token | midpoint(Token left,
        Token right)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() | 
| Token | split(Token left,
     Token right,
     double ratioToLeft)Calculate a Token which take approximate 0 <= ratioToLeft <= 1 ownership of the given range. | 
| default java.util.Optional<Splitter> | splitter() | 
DecoratedKey decorateKey(java.nio.ByteBuffer key)
key - the raw, client-facing keyToken midpoint(Token left, Token right)
Token split(Token left, Token right, double ratioToLeft)
Token getMinimumToken()
default Token getMaximumToken()
Token getToken(java.nio.ByteBuffer key)
Token getRandomToken()
Token getRandomToken(java.util.Random random)
random - instance of Random to use when generating the tokenToken.TokenFactory getTokenFactory()
boolean preservesOrder()
java.util.Map<Token,java.lang.Float> describeOwnership(java.util.List<Token> sortedTokens)
sortedTokens - a sorted List of TokensAbstractType<?> getTokenValidator()
AbstractType<?> partitionOrdering()
default java.util.Optional<Splitter> splitter()
Copyright © 2018 The Apache Software Foundation