T - types of objects returned from the GETpublic class BulkGetFuture<T> extends AbstractListenableFuture<Map<String,T>,BulkGetCompletionListener> implements BulkFuture<Map<String,T>>
| Constructor and Description |
|---|
BulkGetFuture(Map<String,Future<T>> m,
Collection<Operation> getOps,
CountDownLatch l,
ExecutorService service) |
| Modifier and Type | Method and Description |
|---|---|
Future<Map<String,T>> |
addListener(BulkGetCompletionListener listener)
Add a listener to the future, which will be executed once the operation
completes.
|
boolean |
cancel(boolean ign) |
Map<String,T> |
get() |
Map<String,T> |
get(long to,
TimeUnit unit) |
Map<String,T> |
getSome(long to,
TimeUnit unit)
Wait for the operation to complete and return results
If operation could not complete within specified timeout, partial result is
returned.
|
OperationStatus |
getStatus()
Gets the status of the operation upon completion.
|
boolean |
isCancelled() |
boolean |
isDone() |
boolean |
isTimeout() |
Future<Map<String,T>> |
removeListener(BulkGetCompletionListener listener)
Remove a previously added listener from the future.
|
void |
setStatus(OperationStatus s) |
void |
signalComplete()
Signals that this future is complete.
|
addToListeners, executor, notifyListener, notifyListeners, notifyListeners, removeFromListenerspublic BulkGetFuture(Map<String,Future<T>> m, Collection<Operation> getOps, CountDownLatch l, ExecutorService service)
public Map<String,T> get() throws InterruptedException, ExecutionException
get in interface Future<Map<String,T>>InterruptedExceptionExecutionExceptionpublic Map<String,T> getSome(long to, TimeUnit unit) throws InterruptedException, ExecutionException
BulkFutureFuture.get(long, TimeUnit)getSome in interface BulkFuture<Map<String,T>>InterruptedExceptionExecutionExceptionpublic Map<String,T> get(long to, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<Map<String,T>>InterruptedExceptionExecutionExceptionTimeoutExceptionpublic OperationStatus getStatus()
BulkFuturegetStatus in interface BulkFuture<Map<String,T>>public void setStatus(OperationStatus s)
public boolean isCancelled()
isCancelled in interface Future<Map<String,T>>public boolean isTimeout()
isTimeout in interface BulkFuture<Map<String,T>>public Future<Map<String,T>> addListener(BulkGetCompletionListener listener)
BulkFutureaddListener in interface BulkFuture<Map<String,T>>addListener in interface ListenableFuture<Map<String,T>,BulkGetCompletionListener>listener - the listener which will be executed.public Future<Map<String,T>> removeListener(BulkGetCompletionListener listener)
BulkFutureremoveListener in interface BulkFuture<Map<String,T>>removeListener in interface ListenableFuture<Map<String,T>,BulkGetCompletionListener>listener - the previously added listener.public void signalComplete()
Copyright © 2019. All rights reserved.