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.| 构造器和说明 |
|---|
CompletedFuture(T result) |
public CompletedFuture(T result)
public T get() throws InterruptedException, ExecutionException
get 在接口中 Future<T>InterruptedExceptionExecutionExceptionpublic T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get 在接口中 Future<T>InterruptedExceptionExecutionExceptionTimeoutExceptionpublic boolean isCancelled()
isCancelled 在接口中 Future<T>Copyright © 2023. All rights reserved.