public class LocalSyncTask extends SyncTask implements StreamEventHandler
Awaitable.AbstractAwaitable, Awaitable.AsyncAwaitable, Awaitable.Defaults, Awaitable.SyncAwaitable
Modifier and Type | Field and Description |
---|---|
boolean |
requestRanges |
boolean |
transferRanges |
desc, nodePair, previewKind, rangesToSync, startTime, stat
CANCELLED, UNCANCELLABLE, UNSET
Constructor and Description |
---|
LocalSyncTask(RepairJobDesc desc,
InetAddressAndPort local,
InetAddressAndPort remote,
java.util.List<Range<Token>> diff,
TimeUUID pendingRepair,
boolean requestRanges,
boolean transferRanges,
PreviewKind previewKind) |
Modifier and Type | Method and Description |
---|---|
void |
abort() |
void |
handleStreamEvent(StreamEvent event)
Callback for various streaming events.
|
boolean |
isLocal() |
void |
onFailure(java.lang.Throwable t) |
void |
onSuccess(StreamState result) |
protected void |
startSync()
Starts sending/receiving our list of differences to/from the remote endpoint: creates a callback
that will be called out of band once the streams complete.
|
java.lang.String |
toString() |
await, awaitUntil, flatMap, map
addCallback, addCallback, addCallback, addCallback, addCallback, addCallback, addListener, addListener, addListener, addListeners, await, awaitThrowUncheckedOnInterrupt, awaitThrowUncheckedOnInterrupt, awaitUninterruptibly, awaitUninterruptibly, awaitUntilThrowUncheckedOnInterrupt, awaitUntilUninterruptibly, cancel, cause, description, flatMap, get, get, getNow, getWhenDone, isCancellable, isCancelled, isDone, isSuccess, isUncancellable, map, map, notifyExecutor, removeListener, removeListeners, setUncancellable, setUncancellableExclusive, tryFailure, trySuccess
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
await, awaitUninterruptibly, flatMap, rethrowIfFailed, sync, syncThrowUncheckedOnInterrupt, syncUninterruptibly
public final boolean requestRanges
public final boolean transferRanges
public LocalSyncTask(RepairJobDesc desc, InetAddressAndPort local, InetAddressAndPort remote, java.util.List<Range<Token>> diff, TimeUUID pendingRepair, boolean requestRanges, boolean transferRanges, PreviewKind previewKind)
protected void startSync()
public void handleStreamEvent(StreamEvent event)
StreamEventHandler
handleStreamEvent
in interface StreamEventHandler
event
- Stream event.StreamEvent.Type
public void onSuccess(StreamState result)
onSuccess
in interface com.google.common.util.concurrent.FutureCallback<StreamState>
public void onFailure(java.lang.Throwable t)
onFailure
in interface com.google.common.util.concurrent.FutureCallback<StreamState>
public java.lang.String toString()
toString
in class AbstractFuture<SyncStat>
Copyright © 2009- The Apache Software Foundation