org.apache.cassandra.dht

## Class Token<T>

- java.lang.Object
- - org.apache.cassandra.dht.Token<T>

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Token<T>>, RingPosition<Token<T>>
  Direct Known Subclasses:
    BigIntegerToken, BytesToken, LocalToken, LongToken, StringToken

      public abstract class Token<T>
      extends java.lang.Object
      implements RingPosition<Token<T>>, java.io.Serializable

  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Token.KeyBound`
    `static class` | `Token.TokenFactory<T>`
    `static class` | `Token.TokenSerializer`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Token.TokenSerializer` | `serializer`
    `T` | `token`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `Token(T token)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract int` | `compareTo(Token<T> o)` This determines the comparison for node destination purposes.
    `boolean` | `equals(java.lang.Object obj)`
    `Token<T>` | `getToken()`
    `int` | `hashCode()`
    `boolean` | `isMinimum()`
    `boolean` | `isMinimum(IPartitioner partitioner)`
    `Token.KeyBound` | `maxKeyBound()`
    `Token.KeyBound` | `maxKeyBound(IPartitioner partitioner)`
    `Token.KeyBound` | `minKeyBound()`
    `Token.KeyBound` | `minKeyBound(IPartitioner partitioner)`
    `java.lang.String` | `toString()`
    `<R extends RingPosition> R` | `upperBound(java.lang.Class<R> klass)`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### serializer

          public static final Token.TokenSerializer serializer

    - #### token

          public final T token

  - ### Constructor Detail

    - #### Token

          protected Token(T token)

  - ### Method Detail

    - #### compareTo

          public abstract int compareTo(Token<T> o)

      This determines the comparison for node destination purposes.
      Specified by:
        `compareTo` in interface `java.lang.Comparable<Token<T>>`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### getToken

          public Token<T> getToken()

      Specified by:
        `getToken` in interface `RingPosition<Token<T>>`

    - #### isMinimum

          public boolean isMinimum(IPartitioner partitioner)

      Specified by:
        `isMinimum` in interface `RingPosition<Token<T>>`

    - #### isMinimum

          public boolean isMinimum()

    - #### minKeyBound

          public Token.KeyBound minKeyBound(IPartitioner partitioner)

    - #### minKeyBound

          public Token.KeyBound minKeyBound()

    - #### maxKeyBound

          public Token.KeyBound maxKeyBound(IPartitioner partitioner)

    - #### maxKeyBound

          public Token.KeyBound maxKeyBound()

    - #### upperBound

          public <R extends RingPosition> R upperBound(java.lang.Class<R> klass)

Copyright © 2014 The Apache Software Foundation