All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.commons.util.concurrent.NotifyingFuture Maven / Gradle / Ivy

There is a newer version: 9.1.7.Final
Show newest version
package org.infinispan.commons.util.concurrent;

import java.util.concurrent.Future;

/**
 * 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 {@link FutureListener} for more details. *

* {@link #attachListener(FutureListener)} returns the same future instance, which is useful for 'building' a future. * E.g., *

* Future f = cache.clearAsync().attachListener(new MyCustomListener()); * * @author Manik Surtani * @since 4.0 */ public interface NotifyingFuture extends Future { /** * Attaches a listener and returns the same future instance, to allow for 'building'. * * @param listener listener to attach * @return the same future instance */ NotifyingFuture attachListener(FutureListener listener); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy