org.infinispan.notifications.cachelistener
Class CacheNotifierImpl

java.lang.Object
  extended by org.infinispan.notifications.AbstractListenerImpl
      extended by org.infinispan.notifications.cachelistener.CacheNotifierImpl
All Implemented Interfaces:
CacheNotifier, Listenable

public class CacheNotifierImpl
extends AbstractListenerImpl
implements CacheNotifier

Helper class that handles all notifications to registered listeners.

Since:
4.0
Author:
Manik Surtani (manik@jboss.org), Mircea.Markus@jboss.com

Nested Class Summary
 
Nested classes/interfaces inherited from class org.infinispan.notifications.AbstractListenerImpl
AbstractListenerImpl.ListenerInvocation
 
Field Summary
 
Fields inherited from class org.infinispan.notifications.AbstractListenerImpl
asyncProcessor, listenersMap, syncProcessor
 
Constructor Summary
CacheNotifierImpl()
           
 
Method Summary
protected  Map<Class<? extends Annotation>,Class> getAllowedMethodAnnotations()
           
protected  Log getLog()
           
 void notifyCacheEntryActivated(Object key, boolean pre, InvocationContext ctx)
          Notifies all registered listeners of a CacheEntryActivated event.
 void notifyCacheEntryCreated(Object key, boolean pre, InvocationContext ctx)
          Notifies all registered listeners of a CacheEntryCreated event.
 void notifyCacheEntryEvicted(Object key, boolean pre, InvocationContext ctx)
          Notifies all registered listeners of a CacheEntryEvicted event.
 void notifyCacheEntryInvalidated(Object key, boolean pre, InvocationContext ctx)
          Notifies all registered listeners of a CacheEntryInvalidated event.
 void notifyCacheEntryLoaded(Object key, boolean pre, InvocationContext ctx)
          Notifies all registered listeners of a CacheEntryLoaded event.
 void notifyCacheEntryModified(Object key, Object value, boolean pre, InvocationContext ctx)
          Notifies all registered listeners of a CacheEntryModified event.
 void notifyCacheEntryPassivated(Object key, boolean pre, InvocationContext ctx)
          Notifies all registered listeners of a CacheEntryPassivated event.
 void notifyCacheEntryRemoved(Object key, Object value, boolean pre, InvocationContext ctx)
          Notifies all registered listeners of a CacheEntryRemoved event.
 void notifyCacheEntryVisited(Object key, boolean pre, InvocationContext ctx)
          Notifies all registered listeners of a CacheEntryVisited event.
 void notifyTransactionCompleted(GlobalTransaction transaction, boolean successful, InvocationContext ctx)
          Notifies all registered listeners of a transaction completion event.
 void notifyTransactionRegistered(GlobalTransaction globalTransaction, InvocationContext ctx)
          Notifies all registered listeners of a transaction registration event.
 
Methods inherited from class org.infinispan.notifications.AbstractListenerImpl
addListener, getListenerCollectionForAnnotation, getListeners, removeAllCacheListeners, removeListener, start, testListenerClassValidity, testListenerMethodValidity
 
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
addListener, getListeners, removeListener
 

Constructor Detail

CacheNotifierImpl

public CacheNotifierImpl()
Method Detail

getLog

protected Log getLog()
Specified by:
getLog in class AbstractListenerImpl

getAllowedMethodAnnotations

protected Map<Class<? extends Annotation>,Class> getAllowedMethodAnnotations()
Specified by:
getAllowedMethodAnnotations in class AbstractListenerImpl

notifyCacheEntryCreated

public void notifyCacheEntryCreated(Object key,
                                    boolean pre,
                                    InvocationContext ctx)
Description copied from interface: CacheNotifier
Notifies all registered listeners of a CacheEntryCreated event.

Specified by:
notifyCacheEntryCreated in interface CacheNotifier

notifyCacheEntryModified

public void notifyCacheEntryModified(Object key,
                                     Object value,
                                     boolean pre,
                                     InvocationContext ctx)
Description copied from interface: CacheNotifier
Notifies all registered listeners of a CacheEntryModified event.

Specified by:
notifyCacheEntryModified in interface CacheNotifier

notifyCacheEntryRemoved

public void notifyCacheEntryRemoved(Object key,
                                    Object value,
                                    boolean pre,
                                    InvocationContext ctx)
Description copied from interface: CacheNotifier
Notifies all registered listeners of a CacheEntryRemoved event.

Specified by:
notifyCacheEntryRemoved in interface CacheNotifier

notifyCacheEntryVisited

public void notifyCacheEntryVisited(Object key,
                                    boolean pre,
                                    InvocationContext ctx)
Description copied from interface: CacheNotifier
Notifies all registered listeners of a CacheEntryVisited event.

Specified by:
notifyCacheEntryVisited in interface CacheNotifier

notifyCacheEntryEvicted

public void notifyCacheEntryEvicted(Object key,
                                    boolean pre,
                                    InvocationContext ctx)
Description copied from interface: CacheNotifier
Notifies all registered listeners of a CacheEntryEvicted event.

Specified by:
notifyCacheEntryEvicted in interface CacheNotifier

notifyCacheEntryInvalidated

public void notifyCacheEntryInvalidated(Object key,
                                        boolean pre,
                                        InvocationContext ctx)
Description copied from interface: CacheNotifier
Notifies all registered listeners of a CacheEntryInvalidated event.

Specified by:
notifyCacheEntryInvalidated in interface CacheNotifier

notifyCacheEntryLoaded

public void notifyCacheEntryLoaded(Object key,
                                   boolean pre,
                                   InvocationContext ctx)
Description copied from interface: CacheNotifier
Notifies all registered listeners of a CacheEntryLoaded event.

Specified by:
notifyCacheEntryLoaded in interface CacheNotifier

notifyCacheEntryActivated

public void notifyCacheEntryActivated(Object key,
                                      boolean pre,
                                      InvocationContext ctx)
Description copied from interface: CacheNotifier
Notifies all registered listeners of a CacheEntryActivated event.

Specified by:
notifyCacheEntryActivated in interface CacheNotifier

notifyCacheEntryPassivated

public void notifyCacheEntryPassivated(Object key,
                                       boolean pre,
                                       InvocationContext ctx)
Description copied from interface: CacheNotifier
Notifies all registered listeners of a CacheEntryPassivated event.

Specified by:
notifyCacheEntryPassivated in interface CacheNotifier

notifyTransactionCompleted

public void notifyTransactionCompleted(GlobalTransaction transaction,
                                       boolean successful,
                                       InvocationContext ctx)
Description copied from interface: CacheNotifier
Notifies all registered listeners of a transaction completion event.

Specified by:
notifyTransactionCompleted in interface CacheNotifier
Parameters:
transaction - the transaction that has just completed
successful - if true, the transaction committed. If false, this is a rollback event

notifyTransactionRegistered

public void notifyTransactionRegistered(GlobalTransaction globalTransaction,
                                        InvocationContext ctx)
Description copied from interface: CacheNotifier
Notifies all registered listeners of a transaction registration event.

Specified by:
notifyTransactionRegistered in interface CacheNotifier

Google Analytics

Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.