T
- the future result type of an asynchronous operation.public final class ComplexFuture<T> extends BasicFuture<T> implements CancellableDependency
Future
whose result depends on another Cancellable
process
or operation or another Future
. Dependent process will get cancelled
if the future itself is cancelled.Constructor and Description |
---|
ComplexFuture(FutureCallback<T> callback) |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
boolean |
completed(T result) |
boolean |
failed(Exception exception) |
void |
setDependency(Cancellable dependency)
Sets
Cancellable dependency on another ongoing process or
operation represented by Cancellable . |
void |
setDependency(Future<?> dependency) |
cancel, get, get, isCancelled, isDone
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isCancelled
cancel
public ComplexFuture(FutureCallback<T> callback)
public void setDependency(Cancellable dependency)
CancellableDependency
Cancellable
dependency on another ongoing process or
operation represented by Cancellable
.setDependency
in interface CancellableDependency
dependency
- another ongoing process or operation.public void setDependency(Future<?> dependency)
public boolean completed(T result)
completed
in class BasicFuture<T>
public boolean failed(Exception exception)
failed
in class BasicFuture<T>
Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.