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 classCacheManagerNotifierImpl.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
-
-
Constructor Summary
Constructors Constructor Description CacheManagerNotifierImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletionStage<Void>addListenerAsync(Object listener)Asynchronous version ofListenable.addListener(Object)protected Map<Class<? extends Annotation>,Class<?>>getAllowedMethodAnnotations(Listener l)protected LoggetLog()CompletionStage<Void>notifyCacheStarted(String cacheName)CompletionStage<Void>notifyCacheStopped(String cacheName)CompletionStage<Void>notifyMerge(List<Address> members, List<Address> oldMembers, Address myAddress, int viewId, List<List<Address>> subgroupsMerged)CompletionStage<Void>notifyViewChange(List<Address> members, List<Address> oldMembers, Address myAddress, int viewId)Notifies all registered listeners of a viewChange event.CompletionStage<Void>removeListenerAsync(Object listener)Asynchronous version ofListenable.removeListener(Object)protected voidresumeIfNeeded(Transaction transaction)voidstart()protected TransactionsuspendIfNeeded()-
Methods inherited from class org.infinispan.notifications.impl.AbstractListenerImpl
canApply, composeStageIfNeeded, findListenerCallbacks, getListenerCollectionForAnnotation, getListeners, hasListener, removeListenerFromMaps, removeListenerInvocation, resumeOnCPU, 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.cachemanagerlistener.CacheManagerNotifier
hasListener
-
Methods inherited from interface org.infinispan.notifications.Listenable
addListener, getListeners, removeListener
-
-
-
-
Method Detail
-
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
public CompletionStage<Void> notifyCacheStarted(String cacheName)
- Specified by:
notifyCacheStartedin interfaceCacheManagerNotifier
-
notifyCacheStopped
public CompletionStage<Void> notifyCacheStopped(String cacheName)
- Specified by:
notifyCacheStoppedin interfaceCacheManagerNotifier
-
addListenerAsync
public CompletionStage<Void> addListenerAsync(Object listener)
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
public CompletionStage<Void> removeListenerAsync(Object listener)
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 Log getLog()
- Specified by:
getLogin classAbstractListenerImpl<Event,ListenerInvocation<Event>>
-
getAllowedMethodAnnotations
protected Map<Class<? extends Annotation>,Class<?>> getAllowedMethodAnnotations(Listener l)
- Specified by:
getAllowedMethodAnnotationsin classAbstractListenerImpl<Event,ListenerInvocation<Event>>
-
suspendIfNeeded
protected final Transaction suspendIfNeeded()
- Specified by:
suspendIfNeededin classAbstractListenerImpl<Event,ListenerInvocation<Event>>
-
resumeIfNeeded
protected final void resumeIfNeeded(Transaction transaction)
- Specified by:
resumeIfNeededin classAbstractListenerImpl<Event,ListenerInvocation<Event>>
-
start
public void start()
-
-