Class CacheManagerNotifierImpl
- java.lang.Object
-
- 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 java.util.concurrent.CompletionStage<java.lang.Void>
addListenerAsync(java.lang.Object listener)
Asynchronous version ofListenable.addListener(Object)
protected java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.Class<?>>
getAllowedMethodAnnotations(Listener l)
protected org.infinispan.util.logging.Log
getLog()
java.util.concurrent.CompletionStage<java.lang.Void>
notifyCacheStarted(java.lang.String cacheName)
java.util.concurrent.CompletionStage<java.lang.Void>
notifyCacheStopped(java.lang.String cacheName)
java.util.concurrent.CompletionStage<java.lang.Void>
notifyMerge(java.util.List<Address> members, java.util.List<Address> oldMembers, Address myAddress, int viewId, java.util.List<java.util.List<Address>> subgroupsMerged)
java.util.concurrent.CompletionStage<java.lang.Void>
notifyViewChange(java.util.List<Address> members, java.util.List<Address> oldMembers, Address myAddress, int viewId)
Notifies all registered listeners of a viewChange event.java.util.concurrent.CompletionStage<java.lang.Void>
removeListenerAsync(java.lang.Object listener)
Asynchronous version ofListenable.removeListener(Object)
protected void
resumeIfNeeded(javax.transaction.Transaction transaction)
void
start()
protected javax.transaction.Transaction
suspendIfNeeded()
-
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 java.util.concurrent.CompletionStage<java.lang.Void> notifyViewChange(java.util.List<Address> members, java.util.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 java.util.concurrent.CompletionStage<java.lang.Void> notifyMerge(java.util.List<Address> members, java.util.List<Address> oldMembers, Address myAddress, int viewId, java.util.List<java.util.List<Address>> subgroupsMerged)
- Specified by:
notifyMerge
in interfaceCacheManagerNotifier
-
notifyCacheStarted
public java.util.concurrent.CompletionStage<java.lang.Void> notifyCacheStarted(java.lang.String cacheName)
- Specified by:
notifyCacheStarted
in interfaceCacheManagerNotifier
-
notifyCacheStopped
public java.util.concurrent.CompletionStage<java.lang.Void> notifyCacheStopped(java.lang.String cacheName)
- Specified by:
notifyCacheStopped
in interfaceCacheManagerNotifier
-
addListenerAsync
public java.util.concurrent.CompletionStage<java.lang.Void> addListenerAsync(java.lang.Object listener)
Description copied from interface:Listenable
Asynchronous version ofListenable.addListener(Object)
- Specified by:
addListenerAsync
in interfaceListenable
- Parameters:
listener
- listener to add, must not be null- Returns:
- CompletionStage that when complete the listener is fully installed
-
removeListenerAsync
public java.util.concurrent.CompletionStage<java.lang.Void> removeListenerAsync(java.lang.Object listener)
Description copied from interface:Listenable
Asynchronous version ofListenable.removeListener(Object)
- Specified by:
removeListenerAsync
in interfaceListenable
- Specified by:
removeListenerAsync
in classorg.infinispan.notifications.impl.AbstractListenerImpl<Event,org.infinispan.notifications.impl.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()
-
getAllowedMethodAnnotations
protected java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.Class<?>> getAllowedMethodAnnotations(Listener l)
-
suspendIfNeeded
protected final javax.transaction.Transaction suspendIfNeeded()
-
resumeIfNeeded
protected final void resumeIfNeeded(javax.transaction.Transaction transaction)
-
start
public void start()
-
-