org.infinispan.notifications.cachelistener
Interface CacheNotifier

All Superinterfaces:
Listenable
All Known Implementing Classes:
CacheNotifierImpl

public interface CacheNotifier
extends Listenable

Public interface with all allowed notifications.

Since:
4.0
Author:
Mircea.Markus@jboss.com

Method Summary
 void notifyCacheEntriesEvicted(Collection<InternalCacheEntry> entries, InvocationContext ctx)
          Notifies all registered listeners of a CacheEntriesEvicted event.
 void notifyCacheEntryActivated(Object key, Object value, 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, Object value, InvocationContext ctx)
          Syntactic sugar
 void notifyCacheEntryInvalidated(Object key, Object value, boolean pre, InvocationContext ctx)
          Notifies all registered listeners of a CacheEntryInvalidated event.
 void notifyCacheEntryLoaded(Object key, Object value, 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, Object value, 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, Object value, boolean pre, InvocationContext ctx)
          Notifies all registered listeners of a CacheEntryVisited event.
 void notifyDataRehashed(Collection<Address> oldView, Collection<Address> newView, long newViewId, boolean pre)
           
 void notifyTopologyChanged(ConsistentHash oldConsistentHash, ConsistentHash newConsistentHash, boolean pre)
           
 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 interface org.infinispan.notifications.Listenable
addListener, getListeners, removeListener
 

Method Detail

notifyCacheEntryCreated

void notifyCacheEntryCreated(Object key,
                             boolean pre,
                             InvocationContext ctx)
Notifies all registered listeners of a CacheEntryCreated event.


notifyCacheEntryModified

void notifyCacheEntryModified(Object key,
                              Object value,
                              boolean pre,
                              InvocationContext ctx)
Notifies all registered listeners of a CacheEntryModified event.


notifyCacheEntryRemoved

void notifyCacheEntryRemoved(Object key,
                             Object value,
                             boolean pre,
                             InvocationContext ctx)
Notifies all registered listeners of a CacheEntryRemoved event.


notifyCacheEntryVisited

void notifyCacheEntryVisited(Object key,
                             Object value,
                             boolean pre,
                             InvocationContext ctx)
Notifies all registered listeners of a CacheEntryVisited event.


notifyCacheEntriesEvicted

void notifyCacheEntriesEvicted(Collection<InternalCacheEntry> entries,
                               InvocationContext ctx)
Notifies all registered listeners of a CacheEntriesEvicted event.


notifyCacheEntryEvicted

void notifyCacheEntryEvicted(Object key,
                             Object value,
                             InvocationContext ctx)
Syntactic sugar

Parameters:
key - key evicted
value - value evicted
ctx - context

notifyCacheEntryInvalidated

void notifyCacheEntryInvalidated(Object key,
                                 Object value,
                                 boolean pre,
                                 InvocationContext ctx)
Notifies all registered listeners of a CacheEntryInvalidated event.


notifyCacheEntryLoaded

void notifyCacheEntryLoaded(Object key,
                            Object value,
                            boolean pre,
                            InvocationContext ctx)
Notifies all registered listeners of a CacheEntryLoaded event.


notifyCacheEntryActivated

void notifyCacheEntryActivated(Object key,
                               Object value,
                               boolean pre,
                               InvocationContext ctx)
Notifies all registered listeners of a CacheEntryActivated event.


notifyCacheEntryPassivated

void notifyCacheEntryPassivated(Object key,
                                Object value,
                                boolean pre,
                                InvocationContext ctx)
Notifies all registered listeners of a CacheEntryPassivated event.


notifyTransactionCompleted

void notifyTransactionCompleted(GlobalTransaction transaction,
                                boolean successful,
                                InvocationContext ctx)
Notifies all registered listeners of a transaction completion event.

Parameters:
transaction - the transaction that has just completed
successful - if true, the transaction committed. If false, this is a rollback event

notifyTransactionRegistered

void notifyTransactionRegistered(GlobalTransaction globalTransaction,
                                 InvocationContext ctx)
Notifies all registered listeners of a transaction registration event.

Parameters:
globalTransaction -

notifyDataRehashed

void notifyDataRehashed(Collection<Address> oldView,
                        Collection<Address> newView,
                        long newViewId,
                        boolean pre)

notifyTopologyChanged

void notifyTopologyChanged(ConsistentHash oldConsistentHash,
                           ConsistentHash newConsistentHash,
                           boolean pre)

-->

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