Package org.infinispan.notifications
Interface ClassLoaderAwareFilteringListenable<K,V>
-
- All Superinterfaces:
FilteringListenable<K,V>
,Listenable
- All Known Subinterfaces:
CacheNotifier<K,V>
,ClusterCacheNotifier<K,V>
,DataConversionAwareListenable<K,V>
- All Known Implementing Classes:
CacheNotifierImpl
public interface ClassLoaderAwareFilteringListenable<K,V> extends FilteringListenable<K,V>
Interface that enhancesFilteringListenable
with the possibility of specifying theClassLoader
which should be set as the context class loader for the invoked listener method- Since:
- 6.0
- Author:
- Manik Surtani
- See Also:
ClassLoaderAwareListenable
,FilteringListenable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
addListener(java.lang.Object listener, KeyFilter<? super K> filter, java.lang.ClassLoader classLoader)
Adds a listener to the component.default <C> void
addListener(java.lang.Object listener, CacheEventFilter<? super K,? super V> filter, CacheEventConverter<? super K,? super V,C> converter, java.lang.ClassLoader classLoader)
Adds a listener with the provided filter and converter and using a given classloader when invoked.<C> java.util.concurrent.CompletionStage<java.lang.Void>
addListenerAsync(java.lang.Object listener, CacheEventFilter<? super K,? super V> filter, CacheEventConverter<? super K,? super V,C> converter, java.lang.ClassLoader classLoader)
-
Methods inherited from interface org.infinispan.notifications.FilteringListenable
addFilteredListener, addFilteredListenerAsync, addListener, addListener, addListenerAsync, addStorageFormatFilteredListener, addStorageFormatFilteredListenerAsync
-
Methods inherited from interface org.infinispan.notifications.Listenable
addListener, addListenerAsync, getListeners, removeListener, removeListenerAsync
-
-
-
-
Method Detail
-
addListener
void addListener(java.lang.Object listener, KeyFilter<? super K> filter, java.lang.ClassLoader classLoader)
Adds a listener to the component. Typically, listeners would need to be annotated withListener
and further to that, contain methods annotated appropriately, otherwise the listener will not be registered. See theListener
annotation for more information.- Parameters:
listener
- must not be null.classLoader
- class loader
-
addListener
default <C> void addListener(java.lang.Object listener, CacheEventFilter<? super K,? super V> filter, CacheEventConverter<? super K,? super V,C> converter, java.lang.ClassLoader classLoader)
Adds a listener with the provided filter and converter and using a given classloader when invoked. SeeFilteringListenable.addListener(Object, org.infinispan.notifications.cachelistener.filter.CacheEventFilter, org.infinispan.notifications.cachelistener.filter.CacheEventConverter)
for more details.- Type Parameters:
C
- The type that the converter returns. The listener must handle this type in any methods that handle events being returned- Parameters:
listener
- must not be null. The listener to callback on when an event is raisedfilter
- The filter to apply for the entry to see if the event should be raisedconverter
- The converter to convert the filtered entry to a new valueclassLoader
- The class loader to use when the event is fired
-
addListenerAsync
<C> java.util.concurrent.CompletionStage<java.lang.Void> addListenerAsync(java.lang.Object listener, CacheEventFilter<? super K,? super V> filter, CacheEventConverter<? super K,? super V,C> converter, java.lang.ClassLoader classLoader)
-
-