## Uses of Class
org.apache.cassandra.dht.Token

Packages that use Token
org.apache.cassandra.db
org.apache.cassandra.dht
org.apache.cassandra.locator
org.apache.cassandra.service
org.apache.cassandra.utils

Uses of Token in org.apache.cassandra.db

Classes in org.apache.cassandra.db with type parameters of type Token
`class` `DecoratedKey<T extends Token>` Represents a decorated key, handy for certain operations where just working with strings gets slow.

Fields in org.apache.cassandra.db declared as Token
`T` `DecoratedKey.token`

Methods in org.apache.cassandra.db that return Token
`Token` `SystemTable.StorageMetadata.getToken()`

Methods in org.apache.cassandra.db with parameters of type Token
`void` `SystemTable.StorageMetadata.setToken(Token storageId)`
`static void` `SystemTable.updateToken(java.net.InetAddress ep, Token token)` Record token being used by another node
`static void` `SystemTable.updateToken(Token token)` This method is used to update the System Table with the new token for this node

Uses of Token in org.apache.cassandra.dht

Classes in org.apache.cassandra.dht with type parameters of type Token
`interface` `IPartitioner<T extends Token>`

Subclasses of Token in org.apache.cassandra.dht
`class` `BigIntegerToken`
`class` `BytesToken`
`class` `StringToken`

Fields in org.apache.cassandra.dht declared as Token
`Token` `AbstractBounds.left`
`Token` `AbstractBounds.right`
`protected Token` `BootStrapper.token`

Methods in org.apache.cassandra.dht that return Token
`Token` `Token.TokenSerializer.deserialize(java.io.DataInput dis)`
`abstract Token<T>` `Token.TokenFactory.fromByteArray(byte[] bytes)`
`abstract Token<T>` `Token.TokenFactory.fromString(java.lang.String string)`
`static Token` `BootStrapper.getBalancedToken(TokenMetadata metadata, java.util.Map<java.net.InetAddress,java.lang.Double> load)`
`static Token` `BootStrapper.getBootstrapToken(TokenMetadata metadata, java.util.Map<java.net.InetAddress,java.lang.Double> load)` if initialtoken was specified, use that.

Methods in org.apache.cassandra.dht with parameters of type Token
`int` `BigIntegerToken.compareTo(Token<java.math.BigInteger> o)`
`int` `BytesToken.compareTo(Token<byte[]> o)`
`int` `StringToken.compareTo(Token<java.lang.String> o)`
`abstract int` `Token.compareTo(Token<T> o)` This determines the comparison for node destination purposes.
`abstract boolean` `AbstractBounds.contains(Token start)`
`boolean` `Bounds.contains(Token token)`
`boolean` `Range.contains(Token bi)` Helps determine if a given point on the DHT ring is contained in the range in question.
`static boolean` `Range.contains(Token left, Token right, Token bi)`
`static boolean` `Range.contains(Token left, Token right, Token bi)`
`static boolean` `Range.contains(Token left, Token right, Token bi)`
`abstract AbstractBounds` `AbstractBounds.createFrom(Token right)`
`AbstractBounds` `Bounds.createFrom(Token token)`
`AbstractBounds` `Range.createFrom(Token token)`
`static boolean` `Range.isTokenInRanges(Token token, java.lang.Iterable<Range> ranges)`
`static boolean` `Range.isWrapAround(Token left, Token right)` Tells if the given range is a wrap around.
`static boolean` `Range.isWrapAround(Token left, Token right)` Tells if the given range is a wrap around.
`void` `Token.TokenSerializer.serialize(Token token, java.io.DataOutput dos)`
`Pair<AbstractBounds,AbstractBounds>` `AbstractBounds.split(Token token)` Given token T and AbstractBounds ?L,R], returns Pair(?L,T], ?T,R]) (where ? means that the same type of Bounds is returned -- Range or Bounds -- as the original.) The original AbstractBounds must contain the token T.
`abstract byte[]` `Token.TokenFactory.toByteArray(Token<T> token)`
`abstract java.lang.String` `Token.TokenFactory.toString(Token<T> token)`

Constructors in org.apache.cassandra.dht with parameters of type Token
`AbstractBounds(Token left, Token right, IPartitioner partitioner)`
`AbstractBounds(Token left, Token right, IPartitioner partitioner)`
`BootStrapper(java.net.InetAddress address, Token token, TokenMetadata tmd)`
`Bounds(Token left, Token right)`
`Bounds(Token left, Token right)`
`Range(Token left, Token right)`
`Range(Token left, Token right)`
`Range(Token left, Token right, IPartitioner partitioner)`
`Range(Token left, Token right, IPartitioner partitioner)`

Uses of Token in org.apache.cassandra.locator

Methods in org.apache.cassandra.locator that return Token
`Token` `TokenMetadata.getPredecessor(Token token)`
`Token` `TokenMetadata.getSuccessor(Token token)`
`Token` `TokenMetadata.getToken(java.net.InetAddress endpoint)`

Methods in org.apache.cassandra.locator that return types with arguments of type Token
`java.util.Map<Token,java.net.InetAddress>` `TokenMetadata.getBootstrapTokens()` caller should not modify bootstrapTokens
`static java.util.Iterator<Token>` `TokenMetadata.ringIterator(java.util.List ring, Token start, boolean includeMin)` iterator over the Tokens in the given ring, starting with the token for the node owning start (which does not have to be a Token in the ring)
`java.util.List<Token>` `TokenMetadata.sortedTokens()`

Methods in org.apache.cassandra.locator with parameters of type Token
`void` `TokenMetadata.addBootstrapToken(Token token, java.net.InetAddress endpoint)`
`java.net.InetAddress` `TokenMetadata.getEndPoint(Token token)`
`java.util.ArrayList<java.net.InetAddress>` `AbstractReplicationStrategy.getNaturalEndpoints(Token token, java.lang.String table)`
`abstract java.util.ArrayList<java.net.InetAddress>` `AbstractReplicationStrategy.getNaturalEndpoints(Token token, TokenMetadata metadata, java.lang.String table)` get the endpoints that should store the given Token, for the given table.
`java.util.ArrayList<java.net.InetAddress>` `RackAwareStrategy.getNaturalEndpoints(Token token, TokenMetadata metadata, java.lang.String table)`
`java.util.ArrayList<java.net.InetAddress>` `RackUnawareStrategy.getNaturalEndpoints(Token token, TokenMetadata metadata, java.lang.String table)`
`java.util.Collection<Range>` `AbstractReplicationStrategy.getPendingAddressRanges(TokenMetadata metadata, Token pendingToken, java.net.InetAddress pendingAddress, java.lang.String table)`
`Token` `TokenMetadata.getPredecessor(Token token)`
`Range` `TokenMetadata.getPrimaryRangeFor(Token right)`
`Token` `TokenMetadata.getSuccessor(Token token)`

`java.util.Collection<java.net.InetAddress>`

`AbstractReplicationStrategy.getWriteEndpoints(Token token, java.lang.String table, java.util.Collection<java.net.InetAddress> naturalEndpoints)`
write endpoints may be different from read endpoints, because read endpoints only need care about the "natural" nodes for a token, but write endpoints also need to account for nodes that are bootstrapping into the ring, and write data there too so that they stay up to date during the bootstrap process.

`void` `TokenMetadata.removeBootstrapToken(Token token)`
`static java.util.Iterator<Token>` `TokenMetadata.ringIterator(java.util.List ring, Token start, boolean includeMin)` iterator over the Tokens in the given ring, starting with the token for the node owning start (which does not have to be a Token in the ring)
`void` `TokenMetadata.updateNormalToken(Token token, java.net.InetAddress endpoint)`

Constructor parameters in org.apache.cassandra.locator with type arguments of type Token
`TokenMetadata(com.google.common.collect.BiMap<Token,java.net.InetAddress> tokenToEndPointMap)`

Uses of Token in org.apache.cassandra.service

Methods in org.apache.cassandra.service that return Token
`Token` `StorageService.getBootstrapToken()` return a token to which if a node bootstraps it will get about 1/2 of this node's range
`Token` `StorageService.getLocalToken()`

Methods in org.apache.cassandra.service that return types with arguments of type Token
`java.util.List<Token>` `StorageService.getSplits(Range range, int keysPerSplit)`

Methods in org.apache.cassandra.service with parameters of type Token
`java.util.List<java.net.InetAddress>` `StorageService.getLiveNaturalEndpoints(java.lang.String table, Token token)`
`java.util.List<java.net.InetAddress>` `StorageService.getNaturalEndpoints(java.lang.String table, Token token)` This method returns the N endpoints that are responsible for storing the specified key i.e for replication.
`void` `StorageService.setToken(Token token)` This method updates the local token on disk

Method parameters in org.apache.cassandra.service with type arguments of type Token
`java.util.List<Range>` `StorageService.getAllRanges(java.util.List<Token> sortedTokens)` Get all ranges that span the ring given a set of tokens.

Uses of Token in org.apache.cassandra.utils

Fields in org.apache.cassandra.utils declared as Token
`Token` `MerkleTree.RowHash.token`

Methods in org.apache.cassandra.utils with parameters of type Token
`void` `MerkleTree.compact(Token t)` Compacts the smallest subranges evenly split by the given token into a single range.
`void` `MerkleTree.invalidate(Token t)` Invalidates the ranges containing the given token.
`boolean` `MerkleTree.split(Token t)` Splits the range containing the given token, if no tree limits would be violated.

Constructors in org.apache.cassandra.utils with parameters of type Token
`MerkleTree.RowHash(Token token, byte[] hash)`

Copyright © 2010 The Apache Software Foundation