Class CacheManagerNotifierImpl
java.lang.Object
org.infinispan.notifications.impl.AbstractListenerImpl<Event, ListenerInvocation<Event>>
org.infinispan.notifications.cachemanagerlistener.CacheManagerNotifierImpl
- All Implemented Interfaces:
CacheManagerNotifier, Listenable
public class CacheManagerNotifierImpl
extends AbstractListenerImpl<Event, ListenerInvocation<Event>>
implements CacheManagerNotifier
Global, shared notifications on the cache manager.
- Since:
- 4.0
- Author:
- Manik Surtani
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class AbstractListenerImpl
AbstractListenerImpl.AbstractInvocationBuilder, AbstractListenerImpl.ListenerInvocationImpl<A> -
Field Summary
Fields inherited from class AbstractListenerImpl
asyncProcessor, listenersMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddListenerAsync(Object listener) Asynchronous version ofListenable.addListener(Object)protected Map<Class<? extends Annotation>, Class<?>> protected org.infinispan.util.logging.LoggetLog()protected voidnotifyCacheStarted(String cacheName) notifyCacheStopped(String cacheName) notifyConfigurationChanged(ConfigurationChangedEvent.EventType eventType, String entityType, String entityName) Notifies all registered listeners of a configurationChange event.notifyCrossSiteViewChanged(Collection<String> siteView, Collection<String> sitesUp, Collection<String> sitesDown) Notifies all registered listeners of a sites view change eventnotifyMerge(List<Address> members, List<Address> oldMembers, Address myAddress, int viewId, List<List<Address>> subgroupsMerged) Notifies all registered listeners of a viewChange event.removeListenerAsync(Object listener) Asynchronous version ofListenable.removeListener(Object)protected final voidresumeIfNeeded(jakarta.transaction.Transaction transaction) voidstart()protected final jakarta.transaction.TransactionMethods inherited from class AbstractListenerImpl
canApply, composeStageIfNeeded, findListenerCallbacks, getListenerCollectionForAnnotation, getListeners, hasListener, hasListeners, invokeListeners, removeListenerFromMaps, removeListenerInvocation, resumeOnCPU, stop, testListenerClassValidity, testListenerMethodValidity, validateAndAddFilterListenerInvocations, validateAndAddListenerInvocationsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CacheManagerNotifier
hasListenerMethods inherited from interface Listenable
addListener, removeListener
-
Constructor Details
-
CacheManagerNotifierImpl
public CacheManagerNotifierImpl()
-
-
Method Details
-
notifyViewChange
public CompletionStage<Void> notifyViewChange(List<Address> members, List<Address> oldMembers, Address myAddress, int viewId) Description copied from interface:CacheManagerNotifierNotifies all registered listeners of a viewChange event. Note that viewChange notifications are ALWAYS sent immediately.- Specified by:
notifyViewChangein interfaceCacheManagerNotifier
-
notifyMerge
public CompletionStage<Void> notifyMerge(List<Address> members, List<Address> oldMembers, Address myAddress, int viewId, List<List<Address>> subgroupsMerged) - Specified by:
notifyMergein interfaceCacheManagerNotifier
-
notifyCacheStarted
- Specified by:
notifyCacheStartedin interfaceCacheManagerNotifier
-
notifyCacheStopped
- Specified by:
notifyCacheStoppedin interfaceCacheManagerNotifier
-
notifyConfigurationChanged
public CompletionStage<Void> notifyConfigurationChanged(ConfigurationChangedEvent.EventType eventType, String entityType, String entityName) Description copied from interface:CacheManagerNotifierNotifies all registered listeners of a configurationChange event.- Specified by:
notifyConfigurationChangedin interfaceCacheManagerNotifier- Parameters:
eventType- the type of event (CREATE or REMOVE)entityType- the type of configuration that has changed (e.g. cache, counter, ...)entityName- the name of the configuration item that has been changed- Returns:
- a
CompletionStagewhich completes when the notification has been sent.
-
notifyCrossSiteViewChanged
public CompletionStage<Void> notifyCrossSiteViewChanged(Collection<String> siteView, Collection<String> sitesUp, Collection<String> sitesDown) Description copied from interface:CacheManagerNotifierNotifies all registered listeners of a sites view change event- Specified by:
notifyCrossSiteViewChangedin interfaceCacheManagerNotifier
-
handleException
- Overrides:
handleExceptionin classAbstractListenerImpl<Event, ListenerInvocation<Event>>
-
addListenerAsync
Description copied from interface:ListenableAsynchronous version ofListenable.addListener(Object)- Specified by:
addListenerAsyncin interfaceListenable- Parameters:
listener- listener to add, must not be null- Returns:
- CompletionStage that when complete the listener is fully installed
-
removeListenerAsync
Description copied from interface:ListenableAsynchronous version ofListenable.removeListener(Object)- Specified by:
removeListenerAsyncin interfaceListenable- Specified by:
removeListenerAsyncin classAbstractListenerImpl<Event, ListenerInvocation<Event>>- Parameters:
listener- listener to remove, must not be null- Returns:
- CompletionStage that when complete the listener is fully removed
-
getLog
protected org.infinispan.util.logging.Log getLog()- Specified by:
getLogin classAbstractListenerImpl<Event, ListenerInvocation<Event>>
-
getAllowedMethodAnnotations
- Specified by:
getAllowedMethodAnnotationsin classAbstractListenerImpl<Event, ListenerInvocation<Event>>
-
suspendIfNeeded
protected final jakarta.transaction.Transaction suspendIfNeeded()- Specified by:
suspendIfNeededin classAbstractListenerImpl<Event, ListenerInvocation<Event>>
-
resumeIfNeeded
protected final void resumeIfNeeded(jakarta.transaction.Transaction transaction) - Specified by:
resumeIfNeededin classAbstractListenerImpl<Event, ListenerInvocation<Event>>
-
start
public void start()
-