org.apache.cassandra.repair

## Class AnticompactionTask

- java.lang.Object
- - com.google.common.util.concurrent.AbstractFuture<java.net.InetAddress>
  - - org.apache.cassandra.repair.AnticompactionTask

- All Implemented Interfaces:
    com.google.common.util.concurrent.ListenableFuture<java.net.InetAddress>, java.lang.Runnable, java.util.concurrent.Future<java.net.InetAddress>, IEndpointStateChangeSubscriber, IFailureDetectionEventListener

      public class AnticompactionTask
      extends com.google.common.util.concurrent.AbstractFuture<java.net.InetAddress>
      implements java.lang.Runnable, IEndpointStateChangeSubscriber, IFailureDetectionEventListener

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `AnticompactionTask.AnticompactionCallback` Callback for antitcompaction request.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AnticompactionTask(java.util.UUID parentSession, java.net.InetAddress neighbor, java.util.Collection<Range<Token>> successfulRanges)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `beforeChange(java.net.InetAddress endpoint, EndpointState currentState, ApplicationState newStateKey, VersionedValue newValue)`
    `void` | `convict(java.net.InetAddress endpoint, double phi)` Convict the specified endpoint.
    `void` | `onAlive(java.net.InetAddress endpoint, EndpointState state)`
    `void` | `onChange(java.net.InetAddress endpoint, ApplicationState state, VersionedValue value)`
    `void` | `onDead(java.net.InetAddress endpoint, EndpointState state)`
    `void` | `onJoin(java.net.InetAddress endpoint, EndpointState epState)` Use to inform interested parties about the change in the state for specified endpoint
    `void` | `onRemove(java.net.InetAddress endpoint)`
    `void` | `onRestart(java.net.InetAddress endpoint, EndpointState epState)` Called whenever a node is restarted.
    `void` | `run()`

    - ### Methods inherited from class com.google.common.util.concurrent.AbstractFuture

      `addListener, cancel, get, get, interruptTask, isCancelled, isDone, set, setException, wasInterrupted`

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

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

- - ### Constructor Detail

    - #### AnticompactionTask

          public AnticompactionTask(java.util.UUID parentSession,
                                    java.net.InetAddress neighbor,
                                    java.util.Collection<Range<Token>> successfulRanges)

  - ### Method Detail

    - #### run

          public void run()

      Specified by:
        `run` in interface `java.lang.Runnable`

    - #### onJoin

          public void onJoin(java.net.InetAddress endpoint,
                             EndpointState epState)

      Description copied from interface: `IEndpointStateChangeSubscriber`
      Use to inform interested parties about the change in the state for specified endpoint
      Specified by:
        `onJoin` in interface `IEndpointStateChangeSubscriber`
      Parameters:
        `endpoint` - endpoint for which the state change occurred.
        `epState` - state that actually changed for the above endpoint.

    - #### beforeChange

          public void beforeChange(java.net.InetAddress endpoint,
                                   EndpointState currentState,
                                   ApplicationState newStateKey,
                                   VersionedValue newValue)

      Specified by:
        `beforeChange` in interface `IEndpointStateChangeSubscriber`

    - #### onChange

          public void onChange(java.net.InetAddress endpoint,
                               ApplicationState state,
                               VersionedValue value)

      Specified by:
        `onChange` in interface `IEndpointStateChangeSubscriber`

    - #### onAlive

          public void onAlive(java.net.InetAddress endpoint,
                              EndpointState state)

      Specified by:
        `onAlive` in interface `IEndpointStateChangeSubscriber`

    - #### onDead

          public void onDead(java.net.InetAddress endpoint,
                             EndpointState state)

      Specified by:
        `onDead` in interface `IEndpointStateChangeSubscriber`

    - #### onRemove

          public void onRemove(java.net.InetAddress endpoint)

      Specified by:
        `onRemove` in interface `IEndpointStateChangeSubscriber`

    - #### onRestart

          public void onRestart(java.net.InetAddress endpoint,
                                EndpointState epState)

      Description copied from interface: `IEndpointStateChangeSubscriber`
      Called whenever a node is restarted. Note that there is no guarantee when that happens that the node was previously marked down. It will have only if `state.isAlive() == false` as `state` is from before the restarted node is marked up.
      Specified by:
        `onRestart` in interface `IEndpointStateChangeSubscriber`

    - #### convict

          public void convict(java.net.InetAddress endpoint,
                              double phi)

      Description copied from interface: `IFailureDetectionEventListener`
      Convict the specified endpoint.
      Specified by:
        `convict` in interface `IFailureDetectionEventListener`
      Parameters:
        `endpoint` - endpoint to be convicted
        `phi` - the value of phi with with ep was convicted

Copyright © 2018 The Apache Software Foundation