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 Classes Modifier and Type Class Description protected class
CacheManagerNotifierImpl.DefaultBuilder
-
Nested classes/interfaces inherited from class org.infinispan.notifications.impl.AbstractListenerImpl
AbstractListenerImpl.AbstractInvocationBuilder, AbstractListenerImpl.ListenerInvocationImpl<A>
-
-
Field Summary
-
Fields inherited from class org.infinispan.notifications.impl.AbstractListenerImpl
asyncProcessor, listenersMap, syncProcessor
-
-
Constructor Summary
Constructors Constructor Description CacheManagerNotifierImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(Object listener)
Adds a listener to the component.protected Map<Class<? extends Annotation>,Class<?>>
getAllowedMethodAnnotations(Listener l)
protected Log
getLog()
void
notifyCacheStarted(String cacheName)
void
notifyCacheStopped(String cacheName)
void
notifyMerge(List<Address> members, List<Address> oldMembers, Address myAddress, int viewId, List<List<Address>> subgroupsMerged)
void
notifyViewChange(List<Address> members, List<Address> oldMembers, Address myAddress, int viewId)
Notifies all registered listeners of a viewChange event.protected void
resumeIfNeeded(Transaction transaction)
protected Transaction
suspendIfNeeded()
-
Methods inherited from class org.infinispan.notifications.impl.AbstractListenerImpl
canApply, findListenerCallbacks, getListenerCollectionForAnnotation, getListeners, removeListener, removeListenerInvocation, start, stop, testListenerClassValidity, testListenerMethodValidity, validateAndAddFilterListenerInvocations, validateAndAddListenerInvocations
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.notifications.Listenable
getListeners, removeListener
-
-
-
-
Method Detail
-
notifyViewChange
public void notifyViewChange(List<Address> members, List<Address> oldMembers, Address myAddress, int viewId)
Description copied from interface:CacheManagerNotifier
Notifies all registered listeners of a viewChange event. Note that viewChange notifications are ALWAYS sent immediately.- Specified by:
notifyViewChange
in interfaceCacheManagerNotifier
-
notifyMerge
public void notifyMerge(List<Address> members, List<Address> oldMembers, Address myAddress, int viewId, List<List<Address>> subgroupsMerged)
- Specified by:
notifyMerge
in interfaceCacheManagerNotifier
-
notifyCacheStarted
public void notifyCacheStarted(String cacheName)
- Specified by:
notifyCacheStarted
in interfaceCacheManagerNotifier
-
notifyCacheStopped
public void notifyCacheStopped(String cacheName)
- Specified by:
notifyCacheStopped
in interfaceCacheManagerNotifier
-
addListener
public void addListener(Object listener)
Description copied from interface:Listenable
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.- Specified by:
addListener
in interfaceListenable
- Parameters:
listener
- must not be null.
-
getLog
protected Log getLog()
- Specified by:
getLog
in classAbstractListenerImpl<Event,ListenerInvocation<Event>>
-
getAllowedMethodAnnotations
protected Map<Class<? extends Annotation>,Class<?>> getAllowedMethodAnnotations(Listener l)
- Specified by:
getAllowedMethodAnnotations
in classAbstractListenerImpl<Event,ListenerInvocation<Event>>
-
suspendIfNeeded
protected final Transaction suspendIfNeeded()
- Specified by:
suspendIfNeeded
in classAbstractListenerImpl<Event,ListenerInvocation<Event>>
-
resumeIfNeeded
protected final void resumeIfNeeded(Transaction transaction)
- Specified by:
resumeIfNeeded
in classAbstractListenerImpl<Event,ListenerInvocation<Event>>
-
-