Package org.jgroups.util
Class NullFuture<T>
java.lang.Object
org.jgroups.util.NullFuture<T>
- All Implemented Interfaces:
Future<T>,NotifyingFuture<T>
- Author:
- Bela Ban
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancancel(boolean mayInterruptIfRunning) get()booleanbooleanisDone()setListener(FutureListener<T> listener) Attaches a listener and returns the same future instance, to allow for 'building' futures.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Constructor Details
-
NullFuture
-
-
Method Details
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) -
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceFuture<T>
-
isDone
public boolean isDone() -
get
- Specified by:
getin interfaceFuture<T>- Throws:
InterruptedExceptionExecutionException
-
get
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
getin interfaceFuture<T>- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
setListener
Description copied from interface:NotifyingFutureAttaches a listener and returns the same future instance, to allow for 'building' futures.- Specified by:
setListenerin interfaceNotifyingFuture<T>- Parameters:
listener- listener to attach- Returns:
- the same future instance
-