V - 泛型对象A - 泛型对象public class FutureCompletionHandler<V,A> extends Object implements CompletionHandler<V,A>, Future<V>, Runnable
| Constructor and Description |
|---|
FutureCompletionHandler() |
FutureCompletionHandler(CompletionHandler<V,A> completionHandler,
A attach) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
void |
completed(V result,
A selectionKey) |
void |
failed(Throwable exc,
A attachment) |
V |
get() |
V |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
void |
run() |
public FutureCompletionHandler(CompletionHandler<V,A> completionHandler, A attach)
public FutureCompletionHandler()
public void completed(V result, A selectionKey)
completed in interface CompletionHandler<V,A>public void failed(Throwable exc, A attachment)
failed in interface CompletionHandler<V,A>public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<V>public V get() throws InterruptedException, ExecutionException
get in interface Future<V>InterruptedExceptionExecutionExceptionpublic V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<V>InterruptedExceptionExecutionExceptionTimeoutExceptionCopyright © 2021. All rights reserved.