org.compass.core.executor
Class DummyFuture<T>

java.lang.Object
  extended by 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

Constructor Summary
DummyFuture(Exception e)
           
DummyFuture(T result)
           
 
Method Summary
 boolean cancel(boolean mayInterruptIfRunning)
           
 T get()
           
 T get(long timeout, TimeUnit unit)
           
 boolean isCancelled()
           
 boolean isDone()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyFuture

public DummyFuture(Exception e)

DummyFuture

public DummyFuture(T result)
Method Detail

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-2009 The Compass Project.