org.infinispan.util.concurrent
Class NotifyingFutureImpl<T>

java.lang.Object
  extended by org.infinispan.util.concurrent.BaseNotifyingFuture<T>
      extended by org.infinispan.util.concurrent.NotifyingFutureImpl<T>
All Implemented Interfaces:
Future<T>, NotifyingFuture<T>, NotifyingNotifiableFuture<T>
Direct Known Subclasses:
AggregatingNotifyingFutureImpl

public class NotifyingFutureImpl<T>
extends BaseNotifyingFuture<T>
implements NotifyingNotifiableFuture<T>

Constructs an instance of a NotifyingFuture.

Typical usage:

Object retval = .... // do some work here NotifyingFuture nf = new NotifyingFutureImpl(retval); rpcManager.broadcastRpcCommandInFuture(nf, command); return nf;

Since:
4.0
Author:
Manik Surtani

Constructor Summary
NotifyingFutureImpl(T actualReturnValue)
           
 
Method Summary
 boolean cancel(boolean mayInterruptIfRunning)
           
 T get()
           
 T get(long timeout, TimeUnit unit)
           
 boolean isCancelled()
           
 boolean isDone()
           
 void setNetworkFuture(Future<T> future)
           
 
Methods inherited from class org.infinispan.util.concurrent.BaseNotifyingFuture
attachListener, notifyDone
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.infinispan.util.concurrent.NotifyingNotifiableFuture
notifyDone
 
Methods inherited from interface org.infinispan.util.concurrent.NotifyingFuture
attachListener
 

Constructor Detail

NotifyingFutureImpl

public NotifyingFutureImpl(T actualReturnValue)
Method Detail

setNetworkFuture

public void setNetworkFuture(Future<T> future)
Specified by:
setNetworkFuture in interface NotifyingNotifiableFuture<T>

cancel

public boolean cancel(boolean mayInterruptIfRunning)
Specified by:
cancel in interface Future<T>

isCancelled

public boolean isCancelled()
Specified by:
isCancelled in interface Future<T>

isDone

public boolean isDone()
Specified by:
isDone in interface Future<T>

get

public T get()
      throws InterruptedException,
             ExecutionException
Specified by:
get in interface Future<T>
Throws:
InterruptedException
ExecutionException

get

public T get(long timeout,
             TimeUnit unit)
      throws InterruptedException,
             ExecutionException,
             TimeoutException
Specified by:
get in interface Future<T>
Throws:
InterruptedException
ExecutionException
TimeoutException

-->

Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.