Package com.googlecode.objectify.util
Class FutureWrapper<K,V>
- java.lang.Object
-
- com.googlecode.objectify.util.FutureWrapper<K,V>
-
- All Implemented Interfaces:
Future<V>
- Direct Known Subclasses:
SimpleFutureWrapper
public abstract class FutureWrapper<K,V> extends Object implements Future<V>
JMS: Copied verbatum from the original GAE SDK. Probably something we can eliminate.FutureWrapper
is a simpleFuture
that wraps a parentFuture
. This class is thread-safe.
-
-
Constructor Summary
Constructors Constructor Description FutureWrapper(Future<K> parent)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected V
absorbParentException(Throwable cause)
Override this method if you want to suppress an exception thrown by the parent and return a value instead.boolean
cancel(boolean mayInterruptIfRunning)
protected abstract Throwable
convertException(Throwable cause)
boolean
equals(Object obj)
V
get()
V
get(long timeout, TimeUnit unit)
int
hashCode()
boolean
isCancelled()
boolean
isDone()
protected abstract V
wrap(K key)
-
-
-
Method Detail
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interfaceFuture<K>
-
get
public V get() throws ExecutionException, InterruptedException
- Specified by:
get
in interfaceFuture<K>
- Throws:
ExecutionException
InterruptedException
-
get
public V get(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException, ExecutionException
- Specified by:
get
in interfaceFuture<K>
- Throws:
InterruptedException
TimeoutException
ExecutionException
-
absorbParentException
protected V absorbParentException(Throwable cause) throws Throwable
Override this method if you want to suppress an exception thrown by the parent and return a value instead.- Throws:
Throwable
-
-