public class CompletableFutureTask<V> extends AbstractCompletableFuture<V> implements ICompletableFuture<V>, RunnableFuture<V>
Constructor and Description |
---|
CompletableFutureTask(Callable<V> callable,
ExecutorService asyncExecutor) |
CompletableFutureTask(Runnable runnable,
V result,
ExecutorService asyncExecutor) |
Modifier and Type | Method and Description |
---|---|
protected void |
cancelled(boolean mayInterruptIfRunning)
Protected method invoked when this task transitions to state
isCancelled . |
void |
run() |
String |
toString() |
andThen, andThen, cancel, done, get, get, getResult, isCancelled, isDone, setResult, shouldCancel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
andThen, andThen
public CompletableFutureTask(Callable<V> callable, ExecutorService asyncExecutor)
public CompletableFutureTask(Runnable runnable, V result, ExecutorService asyncExecutor)
public void run()
run
in interface Runnable
run
in interface RunnableFuture<V>
protected void cancelled(boolean mayInterruptIfRunning)
AbstractCompletableFuture
isCancelled
. The default implementation does nothing.
Subclasses may override this method to invoke callbacks or perform
bookkeeping. Implementation has to handle exceptions itself.cancelled
in class AbstractCompletableFuture<V>
mayInterruptIfRunning
- true
if the thread executing this
task was supposed to be interrupted; otherwise, in-progress tasks are allowed
to completeCopyright © 2021 Hazelcast, Inc.. All Rights Reserved.