Constructor and Description |
---|
MergeFuture(Map<K,V> preloaded,
Future<Map<K,V>> pending) |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
Map<K,V> |
get() |
Map<K,V> |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
public MergeFuture(Map<K,V> preloaded, Future<Map<K,V>> pending)
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.public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled
in interface Future<Map<K,V>>
public boolean isDone()
public Map<K,V> get() throws InterruptedException, ExecutionException
get
in interface Future<Map<K,V>>
InterruptedException
ExecutionException
public Map<K,V> get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<Map<K,V>>
InterruptedException
ExecutionException
TimeoutException
Copyright © 2018. All rights reserved.