org.compass.core.executor
Class DummyFuture<T>
java.lang.Object
org.compass.core.executor.DummyFuture<T>
- All Implemented Interfaces:
- Future<T>
class DummyFuture<T>
- extends Object
- implements Future<T>
A dummy future representing a result that was already processed (with a
result or an exception).
- Author:
- kimchy
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DummyFuture
public DummyFuture(Exception e)
DummyFuture
public DummyFuture(T result)
cancel
public boolean cancel(boolean mayInterruptIfRunning)
- Specified by:
cancel in interface Future<T>
get
public T get()
throws InterruptedException,
ExecutionException
- Specified by:
get in interface Future<T>
- Throws:
InterruptedException
ExecutionException
get
public T get(long timeout,
TimeUnit unit)
throws InterruptedException,
ExecutionException,
TimeoutException
- Specified by:
get in interface Future<T>
- Throws:
InterruptedException
ExecutionException
TimeoutException
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled in interface Future<T>
isDone
public boolean isDone()
- Specified by:
isDone in interface Future<T>
Copyright (c) 2004-2008 The Compass Project.