Interface CacheNotifier<K,V>
-
- All Superinterfaces:
ClassLoaderAwareFilteringListenable<K,V>,ClassLoaderAwareListenable,DataConversionAwareListenable<K,V>,FilteringListenable<K,V>,Listenable
- All Known Subinterfaces:
ClusterCacheNotifier<K,V>
- All Known Implementing Classes:
CacheNotifierImpl
public interface CacheNotifier<K,V> extends DataConversionAwareListenable<K,V>, ClassLoaderAwareListenable
Public interface with all allowed notifications.- Since:
- 4.0
- Author:
- Mircea.Markus@jboss.com
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanhasListener(Class<? extends Annotation> annotationClass)Returns whether there is at least one listener regitstered for the given annotationCompletionStage<Void>notifyCacheEntriesEvicted(Collection<Map.Entry<K,V>> entries, InvocationContext ctx, FlagAffectedCommand command)Notifies all registered listeners of aCacheEntriesEvictedEventevent.CompletionStage<Void>notifyCacheEntryActivated(K key, V value, boolean pre, InvocationContext ctx, FlagAffectedCommand command)Notifies all registered listeners of aCacheEntryActivatedEventevent.CompletionStage<Void>notifyCacheEntryCreated(K key, V value, Metadata metadata, boolean pre, InvocationContext ctx, FlagAffectedCommand command)Notifies all registered listeners of aCacheEntryCreatedEventevent.CompletionStage<Void>notifyCacheEntryExpired(K key, V value, Metadata metadata, InvocationContext ctx)Notifies all registered listeners of a CacheEntryExpired event.CompletionStage<Void>notifyCacheEntryInvalidated(K key, V value, Metadata metadata, boolean pre, InvocationContext ctx, FlagAffectedCommand command)Notifies all registered listeners of aCacheEntryInvalidatedEventevent.CompletionStage<Void>notifyCacheEntryLoaded(K key, V value, boolean pre, InvocationContext ctx, FlagAffectedCommand command)Notifies all registered listeners of aCacheEntryLoadedEventevent.CompletionStage<Void>notifyCacheEntryModified(K key, V value, Metadata metadata, V previousValue, Metadata previousMetadata, boolean pre, InvocationContext ctx, FlagAffectedCommand command)Notifies all registered listeners of aCacheEntryModifiedEventevent.CompletionStage<Void>notifyCacheEntryPassivated(K key, V value, boolean pre, InvocationContext ctx, FlagAffectedCommand command)Notifies all registered listeners of aCacheEntryPassivatedEventevent.CompletionStage<Void>notifyCacheEntryRemoved(K key, V previousValue, Metadata previousMetadata, boolean pre, InvocationContext ctx, FlagAffectedCommand command)Notifies all registered listeners of aCacheEntryRemovedEventevent.CompletionStage<Void>notifyCacheEntryVisited(K key, V value, boolean pre, InvocationContext ctx, FlagAffectedCommand command)Notifies all registered listeners of aCacheEntryVisitedEventevent.CompletionStage<Void>notifyDataRehashed(ConsistentHash oldCH, ConsistentHash newCH, ConsistentHash unionCH, int newTopologyId, boolean pre)CompletionStage<Void>notifyPartitionStatusChanged(AvailabilityMode mode, boolean pre)CompletionStage<Void>notifyPersistenceAvailabilityChanged(boolean available)CompletionStage<Void>notifyTopologyChanged(CacheTopology oldTopology, CacheTopology newTopology, int newTopologyId, boolean pre)CompletionStage<Void>notifyTransactionCompleted(GlobalTransaction transaction, boolean successful, InvocationContext ctx)Notifies all registered listeners of a transaction completion event.CompletionStage<Void>notifyTransactionRegistered(GlobalTransaction globalTransaction, boolean isOriginLocal)Notifies all registered listeners of a transaction registration event.-
Methods inherited from interface org.infinispan.notifications.ClassLoaderAwareFilteringListenable
addListener, addListenerAsync
-
Methods inherited from interface org.infinispan.notifications.ClassLoaderAwareListenable
addListener, addListenerAsync
-
Methods inherited from interface org.infinispan.notifications.DataConversionAwareListenable
addFilteredListener, addFilteredListenerAsync, addListener, addListenerAsync
-
Methods inherited from interface org.infinispan.notifications.FilteringListenable
addFilteredListener, addFilteredListenerAsync, addListener, addListenerAsync, addStorageFormatFilteredListener, addStorageFormatFilteredListenerAsync
-
Methods inherited from interface org.infinispan.notifications.Listenable
addListener, addListenerAsync, getListeners, removeListener, removeListenerAsync
-
-
-
-
Method Detail
-
notifyCacheEntryCreated
CompletionStage<Void> notifyCacheEntryCreated(K key, V value, Metadata metadata, boolean pre, InvocationContext ctx, FlagAffectedCommand command)
Notifies all registered listeners of aCacheEntryCreatedEventevent.
-
notifyCacheEntryModified
CompletionStage<Void> notifyCacheEntryModified(K key, V value, Metadata metadata, V previousValue, Metadata previousMetadata, boolean pre, InvocationContext ctx, FlagAffectedCommand command)
Notifies all registered listeners of aCacheEntryModifiedEventevent.
-
notifyCacheEntryRemoved
CompletionStage<Void> notifyCacheEntryRemoved(K key, V previousValue, Metadata previousMetadata, boolean pre, InvocationContext ctx, FlagAffectedCommand command)
Notifies all registered listeners of aCacheEntryRemovedEventevent.
-
notifyCacheEntryVisited
CompletionStage<Void> notifyCacheEntryVisited(K key, V value, boolean pre, InvocationContext ctx, FlagAffectedCommand command)
Notifies all registered listeners of aCacheEntryVisitedEventevent.
-
notifyCacheEntriesEvicted
CompletionStage<Void> notifyCacheEntriesEvicted(Collection<Map.Entry<K,V>> entries, InvocationContext ctx, FlagAffectedCommand command)
Notifies all registered listeners of aCacheEntriesEvictedEventevent.
-
notifyCacheEntryExpired
CompletionStage<Void> notifyCacheEntryExpired(K key, V value, Metadata metadata, InvocationContext ctx)
Notifies all registered listeners of a CacheEntryExpired event.
-
notifyCacheEntryInvalidated
CompletionStage<Void> notifyCacheEntryInvalidated(K key, V value, Metadata metadata, boolean pre, InvocationContext ctx, FlagAffectedCommand command)
Notifies all registered listeners of aCacheEntryInvalidatedEventevent.
-
notifyCacheEntryLoaded
CompletionStage<Void> notifyCacheEntryLoaded(K key, V value, boolean pre, InvocationContext ctx, FlagAffectedCommand command)
Notifies all registered listeners of aCacheEntryLoadedEventevent.
-
notifyCacheEntryActivated
CompletionStage<Void> notifyCacheEntryActivated(K key, V value, boolean pre, InvocationContext ctx, FlagAffectedCommand command)
Notifies all registered listeners of aCacheEntryActivatedEventevent.
-
notifyCacheEntryPassivated
CompletionStage<Void> notifyCacheEntryPassivated(K key, V value, boolean pre, InvocationContext ctx, FlagAffectedCommand command)
Notifies all registered listeners of aCacheEntryPassivatedEventevent.
-
notifyTransactionCompleted
CompletionStage<Void> notifyTransactionCompleted(GlobalTransaction transaction, boolean successful, InvocationContext ctx)
Notifies all registered listeners of a transaction completion event.- Parameters:
transaction- the transaction that has just completedsuccessful- if true, the transaction committed. If false, this is a rollback event
-
notifyTransactionRegistered
CompletionStage<Void> notifyTransactionRegistered(GlobalTransaction globalTransaction, boolean isOriginLocal)
Notifies all registered listeners of a transaction registration event.- Parameters:
globalTransaction-
-
notifyDataRehashed
CompletionStage<Void> notifyDataRehashed(ConsistentHash oldCH, ConsistentHash newCH, ConsistentHash unionCH, int newTopologyId, boolean pre)
-
notifyTopologyChanged
CompletionStage<Void> notifyTopologyChanged(CacheTopology oldTopology, CacheTopology newTopology, int newTopologyId, boolean pre)
-
notifyPartitionStatusChanged
CompletionStage<Void> notifyPartitionStatusChanged(AvailabilityMode mode, boolean pre)
-
notifyPersistenceAvailabilityChanged
CompletionStage<Void> notifyPersistenceAvailabilityChanged(boolean available)
-
hasListener
boolean hasListener(Class<? extends Annotation> annotationClass)
Returns whether there is at least one listener regitstered for the given annotation- Parameters:
annotationClass- annotation to test for- Returns:
- true if there is a listener mapped to the annotation, otherwise false
-
-