public final class CacheNotifierImpl<K,V> extends AbstractListenerImpl<Event<K,V>,CacheEntryListenerInvocation<K,V>> implements ClusterCacheNotifier<K,V>
| Modifier and Type | Class and Description |
|---|---|
protected static class |
CacheNotifierImpl.BaseCacheEntryListenerInvocation<K,V> |
protected class |
CacheNotifierImpl.CacheInvocationBuilder |
protected static class |
CacheNotifierImpl.ClusteredListenerInvocation<K,V>
This class is to be used with cluster listener invocations only when they have included current state.
|
protected class |
CacheNotifierImpl.DelegatingCacheInvocationBuilder |
AbstractListenerImpl.AbstractInvocationBuilder, AbstractListenerImpl.ListenerInvocationImpl<A>asyncProcessor, listenersMap| Constructor and Description |
|---|
CacheNotifierImpl() |
canApply, composeStageIfNeeded, findListenerCallbacks, getListeners, hasListener, removeListenerFromMaps, resumeOnCPU, testListenerClassValidity, testListenerMethodValidity, validateAndAddFilterListenerInvocations, validateAndAddListenerInvocationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasListeneraddFilteredListener, addListeneraddListeneraddFilteredListener, addListener, addStorageFormatFilteredListeneraddListener, getListeners, removeListeneraddListenerpublic void start()
public void stop()
AbstractListenerImplstop in class AbstractListenerImpl<Event<K,V>,CacheEntryListenerInvocation<K,V>>protected Log getLog()
getLog in class AbstractListenerImpl<Event<K,V>,CacheEntryListenerInvocation<K,V>>protected Map<Class<? extends Annotation>,Class<?>> getAllowedMethodAnnotations(Listener l)
getAllowedMethodAnnotations in class AbstractListenerImpl<Event<K,V>,CacheEntryListenerInvocation<K,V>>protected final Transaction suspendIfNeeded()
suspendIfNeeded in class AbstractListenerImpl<Event<K,V>,CacheEntryListenerInvocation<K,V>>protected final void resumeIfNeeded(Transaction transaction)
resumeIfNeeded in class AbstractListenerImpl<Event<K,V>,CacheEntryListenerInvocation<K,V>>public CompletionStage<Void> notifyCacheEntryCreated(K key, V value, Metadata metadata, boolean pre, InvocationContext ctx, FlagAffectedCommand command)
CacheNotifierCacheEntryCreatedEvent
event.notifyCacheEntryCreated in interface CacheNotifier<K,V>public CompletionStage<Void> notifyCacheEntryModified(K key, V value, Metadata metadata, V previousValue, Metadata previousMetadata, boolean pre, InvocationContext ctx, FlagAffectedCommand command)
CacheNotifierCacheEntryModifiedEvent
event.notifyCacheEntryModified in interface CacheNotifier<K,V>public CompletionStage<Void> notifyCacheEntryRemoved(K key, V previousValue, Metadata previousMetadata, boolean pre, InvocationContext ctx, FlagAffectedCommand command)
CacheNotifierCacheEntryRemovedEvent
event.notifyCacheEntryRemoved in interface CacheNotifier<K,V>public CompletionStage<Void> notifyCacheEntryVisited(K key, V value, boolean pre, InvocationContext ctx, FlagAffectedCommand command)
CacheNotifierCacheEntryVisitedEvent
event.notifyCacheEntryVisited in interface CacheNotifier<K,V>public CompletionStage<Void> notifyCacheEntriesEvicted(Collection<Map.Entry<K,V>> entries, InvocationContext ctx, FlagAffectedCommand command)
CacheNotifierCacheEntriesEvictedEvent
event.notifyCacheEntriesEvicted in interface CacheNotifier<K,V>public CompletionStage<Void> notifyCacheEntryExpired(K key, V value, Metadata metadata, InvocationContext ctx)
CacheNotifiernotifyCacheEntryExpired in interface CacheNotifier<K,V>public CompletionStage<Void> notifyCacheEntryInvalidated(K key, V value, Metadata metadata, boolean pre, InvocationContext ctx, FlagAffectedCommand command)
CacheNotifierCacheEntryInvalidatedEvent
event.notifyCacheEntryInvalidated in interface CacheNotifier<K,V>public CompletionStage<Void> notifyCacheEntryLoaded(K key, V value, boolean pre, InvocationContext ctx, FlagAffectedCommand command)
CacheNotifierCacheEntryLoadedEvent
event.notifyCacheEntryLoaded in interface CacheNotifier<K,V>public CompletionStage<Void> notifyCacheEntryActivated(K key, V value, boolean pre, InvocationContext ctx, FlagAffectedCommand command)
CacheNotifierCacheEntryActivatedEvent
event.notifyCacheEntryActivated in interface CacheNotifier<K,V>public CompletionStage<Void> notifyCacheEntryPassivated(K key, V value, boolean pre, InvocationContext ctx, FlagAffectedCommand command)
CacheNotifierCacheEntryPassivatedEvent
event.notifyCacheEntryPassivated in interface CacheNotifier<K,V>public CompletionStage<Void> notifyTransactionCompleted(GlobalTransaction transaction, boolean successful, InvocationContext ctx)
CacheNotifiernotifyTransactionCompleted in interface CacheNotifier<K,V>transaction - the transaction that has just completedsuccessful - if true, the transaction committed. If false, this is a rollback eventpublic CompletionStage<Void> notifyTransactionRegistered(GlobalTransaction globalTransaction, boolean isOriginLocal)
CacheNotifiernotifyTransactionRegistered in interface CacheNotifier<K,V>public CompletionStage<Void> notifyDataRehashed(ConsistentHash oldCH, ConsistentHash newCH, ConsistentHash unionCH, int newTopologyId, boolean pre)
notifyDataRehashed in interface CacheNotifier<K,V>public CompletionStage<Void> notifyTopologyChanged(CacheTopology oldTopology, CacheTopology newTopology, int newTopologyId, boolean pre)
notifyTopologyChanged in interface CacheNotifier<K,V>public CompletionStage<Void> notifyPartitionStatusChanged(AvailabilityMode mode, boolean pre)
notifyPartitionStatusChanged in interface CacheNotifier<K,V>public CompletionStage<Void> notifyPersistenceAvailabilityChanged(boolean available)
notifyPersistenceAvailabilityChanged in interface CacheNotifier<K,V>public CompletionStage<Void> notifyClusterListeners(Collection<ClusterEvent<K,V>> events, UUID uuid)
ClusterCacheNotifiernotifyClusterListeners in interface ClusterCacheNotifier<K,V>public Collection<ClusterListenerReplicateCallable<K,V>> retrieveClusterListenerCallablesToInstall()
ClusterCacheNotifierretrieveClusterListenerCallablesToInstall in interface ClusterCacheNotifier<K,V>public boolean isNotificationAllowed(FlagAffectedCommand cmd, List<CacheEntryListenerInvocation<K,V>> listeners)
public CompletionStage<Void> addListenerAsync(Object listener)
ListenableListenable.addListener(Object)addListenerAsync in interface Listenablelistener - listener to add, must not be nullpublic CompletionStage<Void> addListenerAsync(Object listener, ClassLoader classLoader)
ClassLoaderAwareListenableClassLoaderAwareListenable.addListener(Object, ClassLoader)addListenerAsync in interface ClassLoaderAwareListenablelistener - listener to add, must not be nullclassLoader - classloader, must not be nullpublic <C> CompletionStage<Void> addListenerAsync(Object listener, CacheEventFilter<? super K,? super V> filter, CacheEventConverter<? super K,? super V,C> converter, ClassLoader classLoader)
addListenerAsync in interface ClassLoaderAwareFilteringListenable<K,V>public List<CacheEntryListenerInvocation<K,V>> getListenerCollectionForAnnotation(Class<? extends Annotation> annotation)
getListenerCollectionForAnnotation in class AbstractListenerImpl<Event<K,V>,CacheEntryListenerInvocation<K,V>>public <C> CompletionStage<Void> addListenerAsync(Object listener, CacheEventFilter<? super K,? super V> filter, CacheEventConverter<? super K,? super V,C> converter)
FilteringListenableFilteringListenable.addListener(Object, CacheEventFilter, CacheEventConverter)addListenerAsync in interface FilteringListenable<K,V>listener - listener to add, must not be nullpublic <C> CompletionStage<Void> addFilteredListenerAsync(Object listener, CacheEventFilter<? super K,? super V> filter, CacheEventConverter<? super K,? super V,C> converter, Set<Class<? extends Annotation>> filterAnnotations)
FilteringListenableFilteringListenable.addFilteredListener(Object, CacheEventFilter, CacheEventConverter, Set)addFilteredListenerAsync in interface FilteringListenable<K,V>public <C> CompletionStage<Void> addStorageFormatFilteredListenerAsync(Object listener, CacheEventFilter<? super K,? super V> filter, CacheEventConverter<? super K,? super V,C> converter, Set<Class<? extends Annotation>> filterAnnotations)
FilteringListenableFilteringListenable.addStorageFormatFilteredListener(Object, CacheEventFilter, CacheEventConverter, Set)addStorageFormatFilteredListenerAsync in interface FilteringListenable<K,V>public <C> CompletionStage<Void> addListenerAsync(ListenerHolder listenerHolder, CacheEventFilter<? super K,? super V> filter, CacheEventConverter<? super K,? super V,C> converter, ClassLoader classLoader)
addListenerAsync in interface DataConversionAwareListenable<K,V>public <C> CompletionStage<Void> addFilteredListenerAsync(ListenerHolder listenerHolder, CacheEventFilter<? super K,? super V> filter, CacheEventConverter<? super K,? super V,C> converter, Set<Class<? extends Annotation>> filterAnnotations)
addFilteredListenerAsync in interface DataConversionAwareListenable<K,V>public CompletionStage<Void> removeListenerAsync(Object listener)
ListenableListenable.removeListener(Object)removeListenerAsync in interface ListenableremoveListenerAsync in class AbstractListenerImpl<Event<K,V>,CacheEntryListenerInvocation<K,V>>listener - listener to remove, must not be nullprotected Set<CacheEntryListenerInvocation<K,V>> removeListenerInvocation(Class<? extends Annotation> annotation, Object listener)
removeListenerInvocation in class AbstractListenerImpl<Event<K,V>,CacheEntryListenerInvocation<K,V>>Copyright © 2021 JBoss by Red Hat. All rights reserved.