public class ValidationTask extends AsyncFuture<TreeResponse> implements java.lang.Runnable
ValidationRequest
to a replica.
When a replica sends back message, task completes.Awaitable.AbstractAwaitable, Awaitable.AsyncAwaitable, Awaitable.Defaults, Awaitable.SyncAwaitable
CANCELLED, UNCANCELLABLE, UNSET
Constructor and Description |
---|
ValidationTask(RepairJobDesc desc,
InetAddressAndPort endpoint,
int nowInSec,
PreviewKind previewKind) |
Modifier and Type | Method and Description |
---|---|
void |
abort()
Release any trees already received by this task, and place it a state where any trees
received subsequently will be properly discarded.
|
boolean |
isActive() |
void |
run()
Send ValidationRequest to replica
|
void |
treesReceived(MerkleTrees trees)
Receive MerkleTrees from replica node.
|
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, toString, tryFailure, trySuccess
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
await, awaitUninterruptibly, flatMap, rethrowIfFailed, sync, syncThrowUncheckedOnInterrupt, syncUninterruptibly
public ValidationTask(RepairJobDesc desc, InetAddressAndPort endpoint, int nowInSec, PreviewKind previewKind)
public void run()
run
in interface java.lang.Runnable
public void treesReceived(MerkleTrees trees)
trees
- MerkleTrees that is sent from replica. Null if validation failed on replica node.public void abort()
public boolean isActive()
Copyright © 2009-2022 The Apache Software Foundation