Package org.apache.hc.core5.concurrent
Class ComplexFuture<T>
java.lang.Object
org.apache.hc.core5.concurrent.BasicFuture<T>
org.apache.hc.core5.concurrent.ComplexFuture<T>
- Type Parameters:
T
- the future result type of an asynchronous operation.
- All Implemented Interfaces:
Future<T>
,Cancellable
,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.- Since:
- 5.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
cancel
(boolean mayInterruptIfRunning) boolean
boolean
void
setDependency
(Future<?> dependency) void
setDependency
(Cancellable dependency) SetsCancellable
dependency on another ongoing process or operation represented byCancellable
.Methods inherited from class org.apache.hc.core5.concurrent.BasicFuture
cancel, get, get, isCancelled, isDone
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hc.core5.concurrent.Cancellable
cancel
Methods inherited from interface org.apache.hc.core5.concurrent.CancellableDependency
isCancelled
-
Field Details
-
dependencyRef
-
-
Constructor Details
-
ComplexFuture
-
-
Method Details
-
setDependency
Description copied from interface:CancellableDependency
SetsCancellable
dependency on another ongoing process or operation represented byCancellable
.- Specified by:
setDependency
in interfaceCancellableDependency
-
setDependency
-
completed
- Overrides:
completed
in classBasicFuture<T>
-
failed
- Overrides:
failed
in classBasicFuture<T>
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-