Class CacheNotifierImpl.BaseCacheEntryListenerInvocation<K,V>
java.lang.Object
org.infinispan.notifications.cachelistener.CacheNotifierImpl.BaseCacheEntryListenerInvocation<K,V>
- All Implemented Interfaces:
CacheEntryListenerInvocation<K,
,V> ListenerInvocation<Event<K,
V>>
- Direct Known Subclasses:
CacheNotifierImpl.ClusteredListenerInvocation
- Enclosing class:
CacheNotifierImpl<K,
V>
protected static class CacheNotifierImpl.BaseCacheEntryListenerInvocation<K,V>
extends Object
implements CacheEntryListenerInvocation<K,V>
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Class
<? extends Annotation> protected final boolean
protected final CacheEventConverter
<? super K, ? super V, ?> protected final CacheEventFilter
<? super K, ? super V> protected final boolean
protected final Set
<Class<? extends Annotation>> protected final UUID
protected final ListenerInvocation
<Event<K, V>> protected final Listener.Observation
protected final boolean
protected final boolean
-
Constructor Summary
ModifierConstructorDescriptionprotected
BaseCacheEntryListenerInvocation
(EncoderRegistry encoderRegistry, ListenerInvocation<Event<K, V>> invocation, CacheEventFilter<? super K, ? super V> filter, CacheEventConverter<? super K, ? super V, ?> converter, Class<? extends Annotation> annotation, boolean onlyPrimary, boolean clustered, UUID identifier, boolean sync, Listener.Observation observation, Set<Class<? extends Annotation>> filterAnnotations, DataConversion keyDataConversion, DataConversion valueDataConversion, boolean useStorageFormat) -
Method Summary
Modifier and TypeMethodDescriptionprotected CacheEntryEvent
<K, V> convertValue
(CacheEventConverter<? super K, ? super V, ?> converter, CacheEntryEvent<K, V> event) protected CompletionStage
<Void> doRealInvocation
(Event<K, V> event) protected CompletionStage
<Void> doRealInvocation
(EventWrapper<K, V, CacheEntryEvent<K, V>> event) Class
<? extends Annotation> CacheEventConverter
<? super K, ? super V, ?> 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>> wrapped, boolean isLocalNodePrimaryOwner) This is the entry point for local listeners firing eventsinvokeNoChecks
(EventWrapper<K, V, CacheEntryEvent<K, V>> wrapped, boolean skipQueue, boolean skipConverter, boolean needsTransform) This is the entry point for remote listener events being firedboolean
boolean
isSync()
protected CacheEntryEvent
<K, V> shouldInvoke
(CacheEntryEvent<K, V> event, boolean isLocalNodePrimaryOwner) protected boolean
shouldInvoke
(Event<K, V> event) toString()
boolean
-
Field Details
-
invocation
-
filter
-
converter
-
onlyPrimary
protected final boolean onlyPrimary -
clustered
protected final boolean clustered -
identifier
-
annotation
-
sync
protected final boolean sync -
filterAndConvert
protected final boolean filterAndConvert -
observation
-
filterAnnotations
-
-
Constructor Details
-
BaseCacheEntryListenerInvocation
protected BaseCacheEntryListenerInvocation(EncoderRegistry encoderRegistry, ListenerInvocation<Event<K, V>> invocation, CacheEventFilter<? super K, ? super V> filter, CacheEventConverter<? super K, ? super V, ?> converter, Class<? extends Annotation> annotation, boolean onlyPrimary, boolean clustered, UUID identifier, boolean sync, Listener.Observation observation, Set<Class<? extends Annotation>> filterAnnotations, DataConversion keyDataConversion, DataConversion valueDataConversion, boolean useStorageFormat)
-
-
Method Details
-
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>> wrapped, boolean isLocalNodePrimaryOwner) This is the entry point for local listeners firing events- Specified by:
invoke
in interfaceCacheEntryListenerInvocation<K,
V> - Parameters:
wrapped
-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>> wrapped, boolean skipQueue, boolean skipConverter, boolean needsTransform) This is the entry point for remote listener events being fired- Specified by:
invokeNoChecks
in interfaceCacheEntryListenerInvocation<K,
V> - Parameters:
wrapped
-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
-
doRealInvocation
-
doRealInvocation
-
shouldInvoke
-
shouldInvoke
protected CacheEntryEvent<K,V> shouldInvoke(CacheEntryEvent<K, V> event, boolean isLocalNodePrimaryOwner) -
getTarget
Description copied from interface:ListenerInvocation
The listener instance that is notified of events- Specified by:
getTarget
in interfaceListenerInvocation<K>
-
getFilter
- Specified by:
getFilter
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
-
getConverter
- Specified by:
getConverter
in interfaceCacheEntryListenerInvocation<K,
V>
-
isClustered
public boolean isClustered()- Specified by:
isClustered
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>
-
convertValue
protected CacheEntryEvent<K,V> convertValue(CacheEventConverter<? super K, ? super V, ?> converter, CacheEntryEvent<K, V> event) -
isSync
public boolean isSync()- Specified by:
isSync
in interfaceCacheEntryListenerInvocation<K,
V>
-
toString
-