net.spy.memcached.internal
Class ImmediateFuture

java.lang.Object
  extended by net.spy.memcached.internal.ImmediateFuture
All Implemented Interfaces:
Future<Boolean>

public class ImmediateFuture
extends Object
implements Future<Boolean>

A future that fires immediately.


Constructor Summary
ImmediateFuture(Boolean returnValue)
           
ImmediateFuture(Exception e)
           
 
Method Summary
 boolean cancel(boolean mayInterruptIfRunning)
           
 Boolean get()
           
 Boolean 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

ImmediateFuture

public ImmediateFuture(Boolean returnValue)

ImmediateFuture

public ImmediateFuture(Exception e)
Method Detail

cancel

public boolean cancel(boolean mayInterruptIfRunning)
Specified by:
cancel in interface Future<Boolean>

get

public Boolean get()
            throws InterruptedException,
                   ExecutionException
Specified by:
get in interface Future<Boolean>
Throws:
InterruptedException
ExecutionException

get

public Boolean get(long timeout,
                   TimeUnit unit)
            throws InterruptedException,
                   ExecutionException,
                   TimeoutException
Specified by:
get in interface Future<Boolean>
Throws:
InterruptedException
ExecutionException
TimeoutException

isCancelled

public boolean isCancelled()
Specified by:
isCancelled in interface Future<Boolean>

isDone

public boolean isDone()
Specified by:
isDone in interface Future<Boolean>