RepairOption (apache-cassandra API)
Date: 2018-02-12

org.apache.cassandra.repair.messages

## Class RepairOption

- java.lang.Object
- - org.apache.cassandra.repair.messages.RepairOption

-     public class RepairOption
      extends java.lang.Object

  Repair options.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `COLUMNFAMILIES_KEY`
    `static java.lang.String` | `DATACENTERS_KEY`
    `static java.lang.String` | `HOSTS_KEY`
    `static java.lang.String` | `INCREMENTAL_KEY`
    `static java.lang.String` | `JOB_THREADS_KEY`
    `static int` | `MAX_JOB_THREADS`
    `static java.lang.String` | `PARALLELISM_KEY`
    `static java.lang.String` | `PRIMARY_RANGE_KEY`
    `static java.lang.String` | `RANGES_KEY`
    `static java.lang.String` | `TRACE_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RepairOption(RepairParallelism parallelism, boolean primaryRange, boolean incremental, boolean trace, int jobThreads, java.util.Collection<Range<Token>> ranges, boolean isSubrangeRepair)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Collection<java.lang.String>` | `getColumnFamilies()`
    `java.util.Collection<java.lang.String>` | `getDataCenters()`
    `java.util.Collection<java.lang.String>` | `getHosts()`
    `int` | `getJobThreads()`
    `RepairParallelism` | `getParallelism()`
    `java.util.Collection<Range<Token>>` | `getRanges()`
    `boolean` | `isGlobal()`
    `boolean` | `isIncremental()`
    `boolean` | `isInLocalDCOnly()`
    `boolean` | `isPrimaryRange()`
    `boolean` | `isSubrangeRepair()`
    `boolean` | `isTraced()`
    `static RepairOption` | `parse(java.util.Map<java.lang.String,java.lang.String> options, IPartitioner partitioner)` Construct RepairOptions object from given map of Strings.
    `java.lang.String` | `toString()`

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

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

- - ### Field Detail

    - #### PARALLELISM_KEY

          public static final java.lang.String PARALLELISM_KEY

      See Also:
        Constant Field Values

    - #### PRIMARY_RANGE_KEY

          public static final java.lang.String PRIMARY_RANGE_KEY

      See Also:
        Constant Field Values

    - #### INCREMENTAL_KEY

          public static final java.lang.String INCREMENTAL_KEY

      See Also:
        Constant Field Values

    - #### JOB_THREADS_KEY

          public static final java.lang.String JOB_THREADS_KEY

      See Also:
        Constant Field Values

    - #### RANGES_KEY

          public static final java.lang.String RANGES_KEY

      See Also:
        Constant Field Values

    - #### COLUMNFAMILIES_KEY

          public static final java.lang.String COLUMNFAMILIES_KEY

      See Also:
        Constant Field Values

    - #### DATACENTERS_KEY

          public static final java.lang.String DATACENTERS_KEY

      See Also:
        Constant Field Values

    - #### HOSTS_KEY

          public static final java.lang.String HOSTS_KEY

      See Also:
        Constant Field Values

    - #### TRACE_KEY

          public static final java.lang.String TRACE_KEY

      See Also:
        Constant Field Values

    - #### MAX_JOB_THREADS

          public static final int MAX_JOB_THREADS

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### RepairOption

          public RepairOption(RepairParallelism parallelism,
                              boolean primaryRange,
                              boolean incremental,
                              boolean trace,
                              int jobThreads,
                              java.util.Collection<Range<Token>> ranges,
                              boolean isSubrangeRepair)

  - ### Method Detail

    - #### parse

          public static RepairOption parse(java.util.Map<java.lang.String,java.lang.String> options,
                                           IPartitioner partitioner)

      Construct RepairOptions object from given map of Strings.

      Available options are:

      Repair Options
      key | value | default (when key not given)
      --- | --- | ---
      parallelism | "sequential", "parallel" or "dc_parallel" | "sequential"
      primaryRange | "true" if perform repair only on primary range. | false
      incremental | "true" if perform incremental repair. | false
      trace | "true" if repair is traced. | false
      jobThreads | Number of threads to use to run repair job. | 1
      ranges | Ranges to repair. A range is expressed as <start token>:<end token> and multiple ranges can be given as comma separated ranges(e.g. aaa:bbb,ccc:ddd). |
      columnFamilies | Specify names of ColumnFamilies to repair. Multiple ColumnFamilies can be given as comma separated values(e.g. cf1,cf2,cf3). |
      dataCenters | Specify names of data centers who participate in this repair. Multiple data centers can be given as comma separated values(e.g. dc1,dc2,dc3). |
      hosts | Specify names of hosts who participate in this repair. Multiple hosts can be given as comma separated values(e.g. cass1,cass2). |

      Parameters:
        `options` - options to parse
        `partitioner` - partitioner is used to construct token ranges
      Returns:
        RepairOptions object

    - #### getParallelism

          public RepairParallelism getParallelism()

    - #### isPrimaryRange

          public boolean isPrimaryRange()

    - #### isIncremental

          public boolean isIncremental()

    - #### isTraced

          public boolean isTraced()

    - #### getJobThreads

          public int getJobThreads()

    - #### getColumnFamilies

          public java.util.Collection<java.lang.String> getColumnFamilies()

    - #### getRanges

          public java.util.Collection<Range<Token>> getRanges()

    - #### getDataCenters

          public java.util.Collection<java.lang.String> getDataCenters()

    - #### getHosts

          public java.util.Collection<java.lang.String> getHosts()

    - #### isGlobal

          public boolean isGlobal()

    - #### isSubrangeRepair

          public boolean isSubrangeRepair()

    - #### isInLocalDCOnly

          public boolean isInLocalDCOnly()

    - #### toString

          public java.lang.String toString()

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

Copyright © 2018 The Apache Software Foundation