Class CacheManagerNotifierImpl
-
- All Implemented Interfaces:
CacheManagerNotifier
,Listenable
public class CacheManagerNotifierImpl extends org.infinispan.notifications.impl.AbstractListenerImpl<Event,org.infinispan.notifications.impl.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
-
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 org.infinispan.util.logging.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 org.infinispan.util.logging.Log getLog()
-
getAllowedMethodAnnotations
protected Map<Class<? extends Annotation>,Class<?>> getAllowedMethodAnnotations(Listener l)
-
suspendIfNeeded
protected final Transaction suspendIfNeeded()
-
resumeIfNeeded
protected final void resumeIfNeeded(Transaction transaction)
-
-