T - The type of object in this Future.public class DoneFuture<T> extends Object implements RunnableFuture<T>
Future that is always done and will just yield the object that was given at creation
time.| Constructor and Description |
|---|
DoneFuture(T payload) |
public DoneFuture(T payload)
public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<T>public T get() throws InterruptedException, ExecutionException
get in interface Future<T>InterruptedExceptionExecutionExceptionpublic T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<T>InterruptedExceptionExecutionExceptionTimeoutExceptionpublic void run()
run in interface Runnablerun in interface RunnableFuture<T>public static <T> DoneFuture<T> nullValue()
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.