Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cassandra.dht
Interface IPartitioner<T extends Token>

All Known Implementing Classes:
  AbstractByteOrderedPartitioner, AbstractPartitioner, ByteOrderedPartitioner, CollatingOrderPreservingPartitioner, LocalPartitioner, OrderPreservingPartitioner, RandomPartitioner

    public interface IPartitioner<T extends Token>

Method Summary
`DecoratedKey<T>` | `convertFromDiskFormat(java.nio.ByteBuffer key)` Deprecated. Used by SSTables before version 'e'. Convert the on disk representation to a DecoratedKey object
`DecoratedKey<T>` | `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.
`T` | `getMinimumToken()`
`T` | `getRandomToken()`
`T` | `getToken(java.nio.ByteBuffer key)`
`Token.TokenFactory` | `getTokenFactory()`
`Token` | `midpoint(Token left, Token right)` Calculate a Token representing the approximate "middle" of the given range.
`
`<T extends RingPosition> T`
` | `minValue(java.lang.Class<T> klass)`
`boolean` | `preservesOrder()`

Method Detail

### convertFromDiskFormat

    DecoratedKey<T> convertFromDiskFormat(java.nio.ByteBuffer key)

  Deprecated. Used by SSTables before version 'e'. Convert the on disk representation to a DecoratedKey object

  Parameters:
    `key` - On disk representation
  Returns:
    DecoratedKey object

### decorateKey

    DecoratedKey<T> decorateKey(java.nio.ByteBuffer key)

  Transform key to object representation of the on-disk format.

  Parameters:
    `key` - the raw, client-facing key
  Returns:
    decorated version of key

### midpoint

    Token midpoint(Token left,
                   Token right)

  Calculate a Token representing the approximate "middle" of the given range.

  Returns:
    The approximate midpoint between left and right.

### getMinimumToken

    T getMinimumToken()

  Returns:
    The minimum possible Token in the range that is being partitioned.

### getToken

    T getToken(java.nio.ByteBuffer key)

  Returns:
    a Token that can be used to route a given key (This is NOT a method to create a Token from its string representation; for that, use TokenFactory.fromString.)

### getRandomToken

    T getRandomToken()

  Returns:
    a randomly generated token

### getTokenFactory

    Token.TokenFactory getTokenFactory()

### preservesOrder

    boolean preservesOrder()

  Returns:
    True if the implementing class preserves key order in the Tokens it generates.

### describeOwnership

    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.

  Parameters:
    `sortedTokens` - a sorted List of Tokens
  Returns:
    the mapping from 'token' to 'percentage of the ring owned by that token'.

### minValue

    <T extends RingPosition> T minValue(java.lang.Class<T> klass)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2013 The Apache Software Foundation