T
- operation result representation.CompletedFuture
.@Deprecated public static class Operations.CompletedFuture<T> extends Object implements Future<T>
Future
in the completed state with a fixed result.
The outcome of the future cannot be altered and it cannot be cancelled.Constructor and Description |
---|
CompletedFuture(T result)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning)
Deprecated.
|
T |
get()
Deprecated.
|
T |
get(long timeout,
TimeUnit unit)
Deprecated.
|
boolean |
isCancelled()
Deprecated.
|
boolean |
isDone()
Deprecated.
|
public CompletedFuture(T result)
public T get() throws InterruptedException, ExecutionException
get
in interface Future<T>
InterruptedException
ExecutionException
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<T>
InterruptedException
ExecutionException
TimeoutException
public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled
in interface Future<T>
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.