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
-
Constructor Summary
ModifierConstructorDescriptionprotected
-
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 convertersboolean
boolean
isSync()
abstract void
Stops 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:ListenerInvocation
The listener instance that is notified of events- Specified by:
getTarget
in interfaceListenerInvocation<K>
-
invoke
Description copied from interface:ListenerInvocation
Invokes the event- Specified by:
invoke
in 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:CacheEntryListenerInvocation
Invokes the event- Specified by:
invoke
in 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:CacheEntryListenerInvocation
Invokes the event without applying filters or converters- Specified by:
invokeNoChecks
in 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:
isClustered
in interfaceCacheEntryListenerInvocation<K,
V>
-
isSync
public boolean isSync()- Specified by:
isSync
in interfaceCacheEntryListenerInvocation<K,
V>
-
getIdentifier
- Specified by:
getIdentifier
in interfaceCacheEntryListenerInvocation<K,
V>
-
getObservation
- Specified by:
getObservation
in interfaceCacheEntryListenerInvocation<K,
V>
-
getAnnotation
- Specified by:
getAnnotation
in interfaceCacheEntryListenerInvocation<K,
V>
-
getFilter
- Specified by:
getFilter
in interfaceCacheEntryListenerInvocation<K,
V>
-
getConverter
- Specified by:
getConverter
in interfaceCacheEntryListenerInvocation<K,
V>
-
getFilterAnnotations
- Specified by:
getFilterAnnotations
in interfaceCacheEntryListenerInvocation<K,
V>
-
getKeyDataConversion
- Specified by:
getKeyDataConversion
in interfaceCacheEntryListenerInvocation<K,
V>
-
getValueDataConversion
- Specified by:
getValueDataConversion
in interfaceCacheEntryListenerInvocation<K,
V>
-
useStorageFormat
public boolean useStorageFormat()- Specified by:
useStorageFormat
in interfaceCacheEntryListenerInvocation<K,
V> - Returns:
- true if the filter/converter should be done in the storage format
-