Package org.apache.cassandra.dht
Class BootStrapper
- java.lang.Object
-
- org.apache.cassandra.utils.progress.ProgressEventNotifierSupport
-
- org.apache.cassandra.dht.BootStrapper
-
- All Implemented Interfaces:
ProgressEventNotifier
public class BootStrapper extends ProgressEventNotifierSupport
-
-
Field Summary
Fields Modifier and Type Field Description protected InetAddressAndPort
address
protected TokenMetadata
tokenMetadata
protected java.util.Collection<Token>
tokens
-
Constructor Summary
Constructors Constructor Description BootStrapper(InetAddressAndPort address, java.util.Collection<Token> tokens, TokenMetadata tmd)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Future<StreamState>
bootstrap(StreamStateStore stateStore, boolean useStrictConsistency)
static java.util.Collection<Token>
getBootstrapTokens(TokenMetadata metadata, InetAddressAndPort address, long schemaTimeoutMillis, long ringTimeoutMillis)
if initialtoken was specified, use that (split on comma).static java.util.Collection<Token>
getRandomTokens(TokenMetadata metadata, int numTokens)
-
Methods inherited from class org.apache.cassandra.utils.progress.ProgressEventNotifierSupport
addProgressListener, fireProgressEvent, removeProgressListener
-
-
-
-
Field Detail
-
address
protected final InetAddressAndPort address
-
tokens
protected final java.util.Collection<Token> tokens
-
tokenMetadata
protected final TokenMetadata tokenMetadata
-
-
Constructor Detail
-
BootStrapper
public BootStrapper(InetAddressAndPort address, java.util.Collection<Token> tokens, TokenMetadata tmd)
-
-
Method Detail
-
bootstrap
public Future<StreamState> bootstrap(StreamStateStore stateStore, boolean useStrictConsistency)
-
getBootstrapTokens
public static java.util.Collection<Token> getBootstrapTokens(TokenMetadata metadata, InetAddressAndPort address, long schemaTimeoutMillis, long ringTimeoutMillis) throws ConfigurationException
if initialtoken was specified, use that (split on comma). otherwise, if allocationKeyspace is specified use the token allocation algorithm to generate suitable tokens else choose num_tokens tokens at random- Throws:
ConfigurationException
-
getRandomTokens
public static java.util.Collection<Token> getRandomTokens(TokenMetadata metadata, int numTokens)
-
-