Class DelegatingCacheEntryListenerInvocation<K,V>
java.lang.Object
org.infinispan.notifications.cachelistener.filter.DelegatingCacheEntryListenerInvocation<K,V>
- Type Parameters:
K- cache key typeV- cache value type
- All Implemented Interfaces:
CacheEntryListenerInvocation<K,,V> ListenerInvocation<Event<K,V>>
public abstract class DelegatingCacheEntryListenerInvocation<K,V>
extends Object
implements CacheEntryListenerInvocation<K,V>
A wrapper around a
CacheEntryListenerInvocation that keeps a reference to the FilterIndexingServiceProvider instance that handles this invocation. All methods are delegated to the wrapped
invocation except CacheEntryListenerInvocation.invoke(EventWrapper, boolean) and ListenerInvocation.invoke(Object). FilterIndexingServiceProvider implementors must extends this class and
implement its abstract unregister() method.- Since:
- 7.2
- Author:
- anistor@redhat.com
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected -
Method Summary
Modifier and TypeMethodDescriptionClass<? extends Annotation> <C> CacheEventConverter<? super K, ? super V, C> CacheEventFilter<? super K, ? super V> Set<Class<? extends Annotation>> The listener instance that is notified of eventsInvokes the eventinvoke(EventWrapper<K, V, CacheEntryEvent<K, V>> event, boolean isLocalNodePrimaryOwner) Invokes the eventinvokeNoChecks(EventWrapper<K, V, CacheEntryEvent<K, V>> event, boolean skipQueue, boolean skipConverter, boolean needsTransform) Invokes the event without applying filters or convertersbooleanbooleanisSync()abstract voidStops handling the invocation.boolean
-
Field Details
-
invocation
-
-
Constructor Details
-
DelegatingCacheEntryListenerInvocation
-
-
Method Details
-
unregister
public abstract void unregister()Stops handling the invocation. This is called when the listener is being unregistered. -
getTarget
Description copied from interface:ListenerInvocationThe listener instance that is notified of events- Specified by:
getTargetin interfaceListenerInvocation<K>
-
invoke
Description copied from interface:ListenerInvocationInvokes the event- Specified by:
invokein interfaceListenerInvocation<K>- Parameters:
event-- Returns:
- null if event was ignored or already complete otherwise the event will be completely notified when the provided stage is completed
-
invoke
public CompletionStage<Void> invoke(EventWrapper<K, V, CacheEntryEvent<K, V>> event, boolean isLocalNodePrimaryOwner) Description copied from interface:CacheEntryListenerInvocationInvokes the event- Specified by:
invokein interfaceCacheEntryListenerInvocation<K,V> - Parameters:
event-isLocalNodePrimaryOwner-- Returns:
- null if event was ignored or already complete otherwise all listeners for the event will be notified when the provided stage is completed
-
invokeNoChecks
public CompletionStage<Void> invokeNoChecks(EventWrapper<K, V, CacheEntryEvent<K, V>> event, boolean skipQueue, boolean skipConverter, boolean needsTransform) Description copied from interface:CacheEntryListenerInvocationInvokes the event without applying filters or converters- Specified by:
invokeNoChecksin interfaceCacheEntryListenerInvocation<K,V> - Parameters:
event-skipQueue-skipConverter-needsTransform-- Returns:
- null if event was ignored or already complete otherwise all listeners for the event will be notified when the provided stage is completed
-
isClustered
public boolean isClustered()- Specified by:
isClusteredin interfaceCacheEntryListenerInvocation<K,V>
-
isSync
public boolean isSync()- Specified by:
isSyncin interfaceCacheEntryListenerInvocation<K,V>
-
getIdentifier
- Specified by:
getIdentifierin interfaceCacheEntryListenerInvocation<K,V>
-
getObservation
- Specified by:
getObservationin interfaceCacheEntryListenerInvocation<K,V>
-
getAnnotation
- Specified by:
getAnnotationin interfaceCacheEntryListenerInvocation<K,V>
-
getFilter
- Specified by:
getFilterin interfaceCacheEntryListenerInvocation<K,V>
-
getConverter
- Specified by:
getConverterin interfaceCacheEntryListenerInvocation<K,V>
-
getFilterAnnotations
- Specified by:
getFilterAnnotationsin interfaceCacheEntryListenerInvocation<K,V>
-
getKeyDataConversion
- Specified by:
getKeyDataConversionin interfaceCacheEntryListenerInvocation<K,V>
-
getValueDataConversion
- Specified by:
getValueDataConversionin interfaceCacheEntryListenerInvocation<K,V>
-
useStorageFormat
public boolean useStorageFormat()- Specified by:
useStorageFormatin interfaceCacheEntryListenerInvocation<K,V> - Returns:
- true if the filter/converter should be done in the storage format
-