Package org.apache.cassandra.repair
Class ValidationTask
- java.lang.Object
-
- org.apache.cassandra.utils.concurrent.AbstractFuture<V>
-
- org.apache.cassandra.utils.concurrent.AsyncFuture<TreeResponse>
-
- org.apache.cassandra.repair.ValidationTask
-
- All Implemented Interfaces:
com.google.common.util.concurrent.ListenableFuture<TreeResponse>,io.netty.util.concurrent.Future<TreeResponse>,java.lang.Runnable,java.util.concurrent.Future<TreeResponse>,Awaitable,Future<TreeResponse>
public class ValidationTask extends AsyncFuture<TreeResponse> implements java.lang.Runnable
ValidationTask sendsValidationRequestto a replica. When a replica sends back message, task completes.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.cassandra.utils.concurrent.Awaitable
Awaitable.AbstractAwaitable, Awaitable.AsyncAwaitable, Awaitable.Defaults, Awaitable.SyncAwaitable
-
-
Field Summary
-
Fields inherited from class org.apache.cassandra.utils.concurrent.AbstractFuture
CANCELLED, UNCANCELLABLE, UNSET
-
-
Constructor Summary
Constructors Constructor Description ValidationTask(RepairJobDesc desc, InetAddressAndPort endpoint, int nowInSec, PreviewKind previewKind)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort()Release any trees already received by this task, and place it a state where any trees received subsequently will be properly discarded.booleanisActive()voidrun()Send ValidationRequest to replicavoidtreesReceived(MerkleTrees trees)Receive MerkleTrees from replica node.-
Methods inherited from class org.apache.cassandra.utils.concurrent.AsyncFuture
await, awaitUntil, flatMap, map
-
Methods inherited from class org.apache.cassandra.utils.concurrent.AbstractFuture
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.utils.concurrent.Future
await, awaitUninterruptibly, flatMap, rethrowIfFailed, sync, syncThrowUncheckedOnInterrupt, syncUninterruptibly
-
-
-
-
Constructor Detail
-
ValidationTask
public ValidationTask(RepairJobDesc desc, InetAddressAndPort endpoint, int nowInSec, PreviewKind previewKind)
-
-
Method Detail
-
run
public void run()
Send ValidationRequest to replica- Specified by:
runin interfacejava.lang.Runnable
-
treesReceived
public void treesReceived(MerkleTrees trees)
Receive MerkleTrees from replica node.- Parameters:
trees- MerkleTrees that is sent from replica. Null if validation failed on replica node.
-
abort
public void abort()
Release any trees already received by this task, and place it a state where any trees received subsequently will be properly discarded.
-
isActive
public boolean isActive()
-
-