org.apache.cassandra.repair

## Class SyncTask

- java.lang.Object
- - com.google.common.util.concurrent.AbstractFuture<SyncStat>
  - - org.apache.cassandra.repair.SyncTask

All Implemented Interfaces:
  com.google.common.util.concurrent.ListenableFuture<SyncStat>, java.lang.Runnable, java.util.concurrent.Future<SyncStat>

Direct Known Subclasses:
  LocalSyncTask, RemoteSyncTask

    public abstract class SyncTask
    extends com.google.common.util.concurrent.AbstractFuture<SyncStat>
    implements java.lang.Runnable

SyncTask will calculate the difference of MerkleTree between two nodes and perform necessary operation to repair replica.

### Field Summary

Fields
`protected RepairJobDesc` `desc`
`protected TreeResponse` `r1`
`protected TreeResponse` `r2`
`protected SyncStat` `stat`

### Constructor Summary

Constructors
Constructor and Description
`SyncTask(RepairJobDesc desc, TreeResponse r1, TreeResponse r2)`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`SyncStat` `getCurrentStat()`
`void` `run()` Compares trees, and triggers repairs for any ranges that mismatch.
`protected abstract void` `startSync(java.util.List<Range<Token>> differences)`

### 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`

### Field Detail

#### desc

    protected final RepairJobDesc desc

#### r1

    protected final TreeResponse r1

#### r2

    protected final TreeResponse r2

#### stat

    protected volatile SyncStat stat

### Constructor Detail

#### SyncTask

    public SyncTask(RepairJobDesc desc,
                    TreeResponse r1,
                    TreeResponse r2)

### Method Detail

#### run

    public void run()

Compares trees, and triggers repairs for any ranges that mismatch.

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

#### getCurrentStat

    public SyncStat getCurrentStat()

#### startSync

    protected abstract void startSync(java.util.List<Range<Token>> differences)