Package org.infinispan.notifications
Interface ClassLoaderAwareListenable
-
- All Superinterfaces:
Listenable
- All Known Subinterfaces:
CacheNotifier<K,V>
,ClusterCacheNotifier<K,V>
- All Known Implementing Classes:
CacheNotifierImpl
public interface ClassLoaderAwareListenable extends Listenable
Interface that enhancesListenable
with the possibility of specifying theClassLoader
which should be set as the context class loader for the invoked listener method- Since:
- 5.2
- Author:
- Tristan Tarrant
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
addListener(java.lang.Object listener, java.lang.ClassLoader classLoader)
Adds a listener along with a class loader to use for the invocationjava.util.concurrent.CompletionStage<java.lang.Void>
addListenerAsync(java.lang.Object listener, java.lang.ClassLoader classLoader)
Asynchronous version ofaddListener(Object, ClassLoader)
-
Methods inherited from interface org.infinispan.notifications.Listenable
addListener, addListenerAsync, getListeners, removeListener, removeListenerAsync
-
-
-
-
Method Detail
-
addListener
default void addListener(java.lang.Object listener, java.lang.ClassLoader classLoader)
Adds a listener along with a class loader to use for the invocation- Parameters:
listener
- listener to add, must not be nullclassLoader
- classloader, must not be null
-
addListenerAsync
java.util.concurrent.CompletionStage<java.lang.Void> addListenerAsync(java.lang.Object listener, java.lang.ClassLoader classLoader)
Asynchronous version ofaddListener(Object, ClassLoader)
- Parameters:
listener
- listener to add, must not be nullclassLoader
- classloader, must not be null- Returns:
- CompletionStage that when complete the listener is fully installed
-
-