public class AggregatingNotifyingFutureBuilder extends NotifyingFutureImpl
NotifyingNotifiableFuture implementation that allows a dynamic number of futures to be attached.
FutureListeners
when it's done. Instead the user can use the build() method to create another future that will call its listeners.
build() and use only this future.| Constructor and Description |
|---|
AggregatingNotifyingFutureBuilder(Object actualReturnValue,
int capacity) |
| Modifier and Type | Method and Description |
|---|---|
NotifyingNotifiableFuture<?> |
build() |
boolean |
cancel(boolean mayInterruptIfRunning) |
Object |
get() |
Object |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
void |
notifyDone() |
void |
setNetworkFuture(Future<Object> future) |
attachListenerpublic AggregatingNotifyingFutureBuilder(Object actualReturnValue, int capacity)
public NotifyingNotifiableFuture<?> build()
public void setNetworkFuture(Future<Object> future)
setNetworkFuture in interface NotifyingNotifiableFuture<Object>setNetworkFuture in class NotifyingFutureImplpublic boolean cancel(boolean mayInterruptIfRunning)
cancel in interface Future<Object>cancel in class NotifyingFutureImplpublic boolean isCancelled()
isCancelled in interface Future<Object>isCancelled in class NotifyingFutureImplpublic boolean isDone()
isDone in interface Future<Object>isDone in class NotifyingFutureImplpublic Object get() throws InterruptedException, ExecutionException
get in interface Future<Object>get in class NotifyingFutureImplInterruptedExceptionExecutionExceptionpublic Object get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<Object>get in class NotifyingFutureImplInterruptedExceptionExecutionExceptionTimeoutExceptionpublic void notifyDone()
notifyDone in interface NotifyingNotifiableFuture<Object>notifyDone in class NotifyingFutureImplCopyright © 2012 JBoss by Red Hat. All Rights Reserved.