Package com.googlecode.objectify.cache
Class MergeFuture<K,V>
- java.lang.Object
-
- com.googlecode.objectify.cache.MergeFuture<K,V>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
cancel(boolean mayInterruptIfRunning)
Map<K,V>
get()
Map<K,V>
get(long timeout, TimeUnit unit)
boolean
isCancelled()
boolean
isDone()
-
-
-
Constructor Detail
-
MergeFuture
public MergeFuture(Map<K,V> preloaded, Future<Map<K,V>> pending)
- Parameters:
preloaded
- is a collection of entities that have already been obtained, say from the memcache. TAKES OWNERSHIP OF THE MAP OBJECT - it will be modified later.pending
- is a future of entities that will be obtained sometime later, or null if merging is unnecessary and the preloaded values complete the result.
-
-
Method Detail
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interfaceFuture<K>
-
isDone
public boolean isDone()
- Specified by:
isDone
in interfaceFuture<K>
- See Also:
Future.isDone()
-
get
public Map<K,V> get() throws InterruptedException, ExecutionException
- Specified by:
get
in interfaceFuture<K>
- Throws:
InterruptedException
ExecutionException
-
get
public Map<K,V> get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
- Specified by:
get
in interfaceFuture<K>
- Throws:
InterruptedException
ExecutionException
TimeoutException
-
-