com.google.appengine.api.utils
Class FutureWrapper<K,V>
- java.lang.Object
-
- com.google.appengine.api.utils.FutureWrapper<K,V>
-
- Type Parameters:
K
- The type of thisFuture
V
- The type of the wrappedFuture
- All Implemented Interfaces:
- java.util.concurrent.Future<V>
public abstract class FutureWrapper<K,V> extends java.lang.Object implements java.util.concurrent.Future<V>
FutureWrapper
is a simpleFuture
that wraps a parentFuture
. This class is thread-safe.
-
-
Constructor Summary
Constructors Constructor and Description FutureWrapper(java.util.concurrent.Future<K> parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description boolean
cancel(boolean mayInterruptIfRunning)
boolean
equals(java.lang.Object obj)
V
get()
V
get(long timeout, java.util.concurrent.TimeUnit unit)
int
hashCode()
boolean
isCancelled()
boolean
isDone()
-
-
-
Constructor Detail
-
FutureWrapper
public FutureWrapper(java.util.concurrent.Future<K> parent)
-
-
Method Detail
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
- Specified by:
cancel
in interfacejava.util.concurrent.Future<V>
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interfacejava.util.concurrent.Future<V>
-
isDone
public boolean isDone()
- Specified by:
isDone
in interfacejava.util.concurrent.Future<V>
-
get
public V get() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Specified by:
get
in interfacejava.util.concurrent.Future<V>
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
get
public V get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.TimeoutException, java.util.concurrent.ExecutionException
- Specified by:
get
in interfacejava.util.concurrent.Future<V>
- Throws:
java.lang.InterruptedException
java.util.concurrent.TimeoutException
java.util.concurrent.ExecutionException
-
hashCode
public final int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public final boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-