org.infinispan.util.concurrent
Interface NotifyingFuture<T>
- All Superinterfaces:
- Future<T>
- All Known Subinterfaces:
- NotifyingNotifiableFuture<Object>
- All Known Implementing Classes:
- AggregatingNotifyingFutureImpl, NotifyingFutureImpl
public interface NotifyingFuture<T>
- extends Future<T>
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(FutureListener)
returns the same future instance, which is useful for 'building' a future.
E.g.,
Future f = cache.clearAsync().attachListener(new MyCustomListener());
- Since:
- 4.0
- Author:
- Manik Surtani
attachListener
NotifyingFuture<T> attachListener(FutureListener<T> listener)
- Attaches a listener and returns the same future instance, to allow for 'building'.
- Parameters:
listener
- listener to attach
- Returns:
- the same future instance
Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.