Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.infinispan.commons.util.concurrent;
 
An internal interface which adds the ability to inform the future of completion.

Author(s):
Manik Surtani
Since:
4.0
public interface NotifyingNotifiableFuture<T> extends NotifyingFuture<T> {
   
Notify the listeners that the operation has finished. Subsequent calls for isDone() will return true and subsequent calls for get() will return the provided result.

Parameters:
result
   void notifyDone(T result);

   
Notify the listeners that the operation has finished. Subsequent calls for isDone() will return true and subsequent calls for get() will throw the provided exception.

Parameters:
exception
   void notifyException(Throwable exception);

   
Setup the future which is wrapped by implementation of this interface. Warning: the implementation must synchronize the call setFuture() and notifyDone() to be executed in this order. Also, all calls delegated to the future must be deferred until the network future is set up.

Parameters:
future
   void setFuture(Future<T> future);
New to GrepCode? Check out our FAQ X