Package org.apache.hc.core5.concurrent
Class CompletedFuture<T>
java.lang.Object
org.apache.hc.core5.concurrent.CompletedFuture<T>
- Type Parameters:
T
- the future result type of an asynchronous operation.
- All Implemented Interfaces:
Future<T>
,Cancellable
@Contract(threading=IMMUTABLE)
public class CompletedFuture<T>
extends Object
implements Future<T>, Cancellable
Immutable, completed future.
- Since:
- 5.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
result
-
-
Constructor Details
-
CompletedFuture
-
-
Method Details
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceFuture<T>
-
isDone
public boolean isDone() -
get
-
get
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) -
cancel
public boolean cancel()Description copied from interface:Cancellable
Cancels the ongoing operation or process.- Specified by:
cancel
in interfaceCancellable
- Returns:
true
if the operation or process has been cancelled as a result of this method call orfalse
if it has already been cancelled or not started.
-