org.apache.cassandra.repair

## Class StreamingRepairTask

- java.lang.Object
- - org.apache.cassandra.repair.StreamingRepairTask

- All Implemented Interfaces:
    com.google.common.util.concurrent.FutureCallback<StreamState>, java.lang.Runnable, StreamEventHandler

      public class StreamingRepairTask
      extends java.lang.Object
      implements java.lang.Runnable, StreamEventHandler

  StreamingRepairTask performs data streaming between two remote replica which neither is not repair coordinator. Task will send `SyncComplete` message back to coordinator upon streaming completion.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StreamingRepairTask(RepairJobDesc desc, SyncRequest request, long repairedAt)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `handleStreamEvent(StreamEvent event)` Callback for various streaming events.
    `void` | `onFailure(java.lang.Throwable t)` If we failed on either stream in or out, reply fail to coordinator
    `void` | `onSuccess(StreamState state)` If we succeeded on both stream in and out, reply back to coordinator
    `void` | `run()`

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

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

- - ### Constructor Detail

    - #### StreamingRepairTask

          public StreamingRepairTask(RepairJobDesc desc,
                                     SyncRequest request,
                                     long repairedAt)

  - ### Method Detail

    - #### run

          public void run()

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

    - #### handleStreamEvent

          public void handleStreamEvent(StreamEvent event)

      Description copied from interface: `StreamEventHandler`
      Callback for various streaming events.
      Specified by:
        `handleStreamEvent` in interface `StreamEventHandler`
      Parameters:
        `event` - Stream event.
      See Also:
        `StreamEvent.Type`

    - #### onSuccess

          public void onSuccess(StreamState state)

      If we succeeded on both stream in and out, reply back to coordinator
      Specified by:
        `onSuccess` in interface `com.google.common.util.concurrent.FutureCallback<StreamState>`

    - #### onFailure

          public void onFailure(java.lang.Throwable t)

      If we failed on either stream in or out, reply fail to coordinator
      Specified by:
        `onFailure` in interface `com.google.common.util.concurrent.FutureCallback<StreamState>`

Copyright © 2018 The Apache Software Foundation