public class ViewFuture extends HttpFuture<ViewResponse>
Constructor and Description |
---|
ViewFuture(java.util.concurrent.CountDownLatch latch,
long timeout,
AbstractView view,
java.util.concurrent.ExecutorService service) |
Modifier and Type | Method and Description |
---|---|
ViewFuture |
addListener(HttpCompletionListener listener)
Add a listener to the future, which will be executed once the operation
completes.
|
ViewResponse |
get(long duration,
java.util.concurrent.TimeUnit units) |
ViewFuture |
removeListener(HttpCompletionListener listener)
Remove a previously added listener from the future.
|
void |
set(ViewResponse viewResponse,
BulkFuture<java.util.Map<java.lang.String,java.lang.Object>> oper,
OperationStatus s) |
cancel, get, getStatus, isCancelled, isDone, set, setOperation, signalComplete, waitForAndCheckOperation
addToListeners, executor, notifyListener, notifyListeners, notifyListeners, removeFromListeners
public ViewFuture(java.util.concurrent.CountDownLatch latch, long timeout, AbstractView view, java.util.concurrent.ExecutorService service)
public ViewResponse get(long duration, java.util.concurrent.TimeUnit units) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
get
in interface java.util.concurrent.Future<ViewResponse>
get
in class HttpFuture<ViewResponse>
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
public void set(ViewResponse viewResponse, BulkFuture<java.util.Map<java.lang.String,java.lang.Object>> oper, OperationStatus s)
public ViewFuture addListener(HttpCompletionListener listener)
ListenableFuture
addListener
in interface ListenableFuture<ViewResponse,HttpCompletionListener>
addListener
in class HttpFuture<ViewResponse>
listener
- the listener which will be executed.public ViewFuture removeListener(HttpCompletionListener listener)
ListenableFuture
removeListener
in interface ListenableFuture<ViewResponse,HttpCompletionListener>
removeListener
in class HttpFuture<ViewResponse>
listener
- the previously added listener.Copyright © 2006-2009 Dustin Sallings, 2009-2014 Couchbase, Inc.