BootStrapper (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.dht

## Class BootStrapper

- java.lang.Object
- - org.apache.cassandra.dht.BootStrapper

-     public class BootStrapper
      extends java.lang.Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `BootStrapper.StringSerializer`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.net.InetAddress` | `address`
    `protected TokenMetadata` | `tokenMetadata`
    `protected java.util.Collection<Token>` | `tokens`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BootStrapper(java.net.InetAddress address, java.util.Collection<Token> tokens, TokenMetadata tmd)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `bootstrap()`
    `static java.util.Collection<Token>` | `getBootstrapTokens(TokenMetadata metadata)` if initialtoken was specified, use that (split on comma).
    `static java.util.Collection<Token>` | `getRandomTokens(TokenMetadata metadata, int numTokens)`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### address

          protected final java.net.InetAddress address

    - #### tokens

          protected final java.util.Collection<Token> tokens

    - #### tokenMetadata

          protected final TokenMetadata tokenMetadata

  - ### Constructor Detail

    - #### BootStrapper

          public BootStrapper(java.net.InetAddress address,
                      java.util.Collection<Token> tokens,
                      TokenMetadata tmd)

  - ### Method Detail

    - #### bootstrap

          public void bootstrap()

    - #### getBootstrapTokens

          public static java.util.Collection<Token> getBootstrapTokens(TokenMetadata metadata)
                                                                throws ConfigurationException

      if initialtoken was specified, use that (split on comma). otherwise, if num_tokens == 1, pick a token to assume half the load of the most-loaded node. else choose num_tokens tokens at random
      Throws:
        `ConfigurationException`

    - #### getRandomTokens

          public static java.util.Collection<Token> getRandomTokens(TokenMetadata metadata,
                                                    int numTokens)

Copyright © 2014 The Apache Software Foundation