Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.infinispan.commons.util.concurrent;
 
A sub-interface of a Future, that allows for listeners to be attached so that observers can be notified of when the future completes.

See FutureListener for more details.

attachListener(org.infinispan.commons.util.concurrent.FutureListener) returns the same future instance, which is useful for 'building' a future. E.g.,

Future<Void> f = cache.clearAsync().attachListener(new MyCustomListener());

Author(s):
Manik Surtani
Since:
4.0
public interface NotifyingFuture<T> extends Future<T> {

   
Attaches a listener and returns the same future instance, to allow for 'building'.

Parameters:
listener listener to attach
Returns:
the same future instance
New to GrepCode? Check out our FAQ X