public class InlineListenableFuture extends Object implements ListenableFuture<Object>
| Constructor and Description |
|---|
InlineListenableFuture() |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(Runnable listener)
register a listener to be run on completion or immediately if complete
any exceptions will be caught and logged
|
Object |
call() |
boolean |
cancel(boolean mayInterruptIfRunning) |
Object |
get() |
Object |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
public InlineListenableFuture()
public void addListener(Runnable listener)
ListenableFutureaddListener in interface ListenableFuture<Object>public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<Object>public Object get() throws InterruptedException, ExecutionException
get in interface Future<Object>InterruptedExceptionExecutionExceptionpublic Object get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<Object>InterruptedExceptionExecutionExceptionTimeoutExceptionCopyright © 2005–2020 The Apache Software Foundation. All rights reserved.