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  
      • Nested classes/interfaces inherited from class org.infinispan.notifications.impl.AbstractListenerImpl

        org.infinispan.notifications.impl.AbstractListenerImpl.AbstractInvocationBuilder, org.infinispan.notifications.impl.AbstractListenerImpl.ListenerInvocationImpl<A>
    • Field Summary

      • Fields inherited from class org.infinispan.notifications.impl.AbstractListenerImpl

        asyncProcessor, listenersMap, syncProcessor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addListener​(java.lang.Object listener)
      Adds a listener to the component.
      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()  
      void notifyCacheStarted​(java.lang.String cacheName)  
      void notifyCacheStopped​(java.lang.String cacheName)  
      void notifyMerge​(java.util.List<Address> members, java.util.List<Address> oldMembers, Address myAddress, int viewId, java.util.List<java.util.List<Address>> subgroupsMerged)  
      void notifyViewChange​(java.util.List<Address> members, java.util.List<Address> oldMembers, Address myAddress, int viewId)
      Notifies all registered listeners of a viewChange event.
      protected void resumeIfNeeded​(javax.transaction.Transaction transaction)  
      protected javax.transaction.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
    • Constructor Detail

      • CacheManagerNotifierImpl

        public CacheManagerNotifierImpl()
    • Method Detail

      • notifyViewChange

        public 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 interface CacheManagerNotifier
      • addListener

        public void addListener​(java.lang.Object listener)
        Description copied from interface: Listenable
        Adds a listener to the component. Typically, listeners would need to be annotated with Listener and further to that, contain methods annotated appropriately, otherwise the listener will not be registered.

        See the Listener annotation for more information.

        Specified by:
        addListener in interface Listenable
        Parameters:
        listener - must not be null.
      • getLog

        protected org.infinispan.util.logging.Log getLog()
        Specified by:
        getLog in class org.infinispan.notifications.impl.AbstractListenerImpl<Event,​org.infinispan.notifications.impl.ListenerInvocation<Event>>
      • getAllowedMethodAnnotations

        protected java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,​java.lang.Class<?>> getAllowedMethodAnnotations​(Listener l)
        Specified by:
        getAllowedMethodAnnotations in class org.infinispan.notifications.impl.AbstractListenerImpl<Event,​org.infinispan.notifications.impl.ListenerInvocation<Event>>
      • suspendIfNeeded

        protected final javax.transaction.Transaction suspendIfNeeded()
        Specified by:
        suspendIfNeeded in class org.infinispan.notifications.impl.AbstractListenerImpl<Event,​org.infinispan.notifications.impl.ListenerInvocation<Event>>
      • resumeIfNeeded

        protected final void resumeIfNeeded​(javax.transaction.Transaction transaction)
        Specified by:
        resumeIfNeeded in class org.infinispan.notifications.impl.AbstractListenerImpl<Event,​org.infinispan.notifications.impl.ListenerInvocation<Event>>