public class NotifyingFutureImpl<T> extends BaseNotifyingFuture<T> implements NotifyingNotifiableFuture<T>
NotifyingFuture
.
Typical usage:
Object retval = .... // do some work here NotifyingFuture nf = new NotifyingFutureImpl(retval);
rpcManager.broadcastRpcCommandInFuture(nf, command); return nf;
Constructor and Description |
---|
NotifyingFutureImpl(T actualReturnValue) |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
T |
get() |
T |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
void |
setNetworkFuture(Future<T> future) |
attachListener, notifyDone
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
notifyDone
attachListener
public NotifyingFutureImpl(T actualReturnValue)
public void setNetworkFuture(Future<T> future)
setNetworkFuture
in interface NotifyingNotifiableFuture<T>
public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled
in interface Future<T>
public T get() throws InterruptedException, ExecutionException
get
in interface Future<T>
InterruptedException
ExecutionException
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<T>
InterruptedException
ExecutionException
TimeoutException
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.