T
- operation result representation.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 |
---|
Operations.CompletedFuture(T result) |
public Operations.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.