Package org.apache.cassandra.dht
Class RandomPartitioner.BigIntegerToken
- java.lang.Object
-
- org.apache.cassandra.dht.Token
-
- org.apache.cassandra.dht.RandomPartitioner.BigIntegerToken
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Token>,RingPosition<Token>
- Enclosing class:
- RandomPartitioner
public static class RandomPartitioner.BigIntegerToken extends Token
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.cassandra.dht.Token
Token.KeyBound, Token.TokenFactory, Token.TokenSerializer
-
-
Field Summary
-
Fields inherited from class org.apache.cassandra.dht.Token
serializer
-
-
Constructor Summary
Constructors Constructor Description BigIntegerToken(java.lang.String token)BigIntegerToken(java.math.BigInteger token)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Token o)booleanequals(java.lang.Object obj)longgetHeapSize()IPartitionergetPartitioner()CgetTokenValue()inthashCode()TokenincreaseSlightly()Returns a token that is slightly greater than this.doublesize(Token next)Returns a measure for the token space covered between this token and next.java.lang.StringtoString()-
Methods inherited from class org.apache.cassandra.dht.Token
getToken, isMinimum, maxKeyBound, minKeyBound, minValue
-
-
-
-
Method Detail
-
getPartitioner
public IPartitioner getPartitioner()
- Specified by:
getPartitionerin interfaceRingPosition<Token>- Specified by:
getPartitionerin classToken
-
getHeapSize
public long getHeapSize()
- Specified by:
getHeapSizein classToken
-
increaseSlightly
public Token increaseSlightly()
Description copied from class:TokenReturns a token that is slightly greater than this. Used to avoid clashes between nodes in separate datacentres trying to use the same token via the token allocation algorithm.
-
size
public double size(Token next)
Description copied from class:TokenReturns a measure for the token space covered between this token and next. Used by the token allocation algorithm (see CASSANDRA-7032).
-
getTokenValue
public C getTokenValue()
- Specified by:
getTokenValuein classToken
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
compareTo
public int compareTo(Token o)
-
-