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 class CacheNotifierImpl.BaseCacheEntryListenerInvocation<K,V>
extends Object
implements CacheEntryListenerInvocation<K,V>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Class<? extends Annotation>protected final booleanprotected final CacheEventConverter<? super K,? super V, ?> protected final CacheEventFilter<? super K,? super V> protected final booleanprotected final Set<Class<? extends Annotation>>protected final UUIDprotected final ListenerInvocation<Event<K,V>> protected final Listener.Observationprotected final booleanprotected final boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseCacheEntryListenerInvocation(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 firedbooleanbooleanisSync()protected CacheEntryEvent<K,V> shouldInvoke(CacheEntryEvent<K, V> event, boolean isLocalNodePrimaryOwner) protected booleanshouldInvoke(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:ListenerInvocationInvokes the event- Specified by:
invokein interfaceListenerInvocation<K>- 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:
invokein 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:
invokeNoChecksin interfaceCacheEntryListenerInvocation<K,V> - Parameters:
wrapped-skipQueue-- 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:ListenerInvocationThe listener instance that is notified of events- Specified by:
getTargetin interfaceListenerInvocation<K>
-
getFilter
- Specified by:
getFilterin 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
-
getConverter
- Specified by:
getConverterin interfaceCacheEntryListenerInvocation<K,V>
-
isClustered
public boolean isClustered()- Specified by:
isClusteredin interfaceCacheEntryListenerInvocation<K,V>
-
getIdentifier
- Specified by:
getIdentifierin interfaceCacheEntryListenerInvocation<K,V>
-
getObservation
- Specified by:
getObservationin interfaceCacheEntryListenerInvocation<K,V>
-
getAnnotation
- Specified by:
getAnnotationin 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:
isSyncin interfaceCacheEntryListenerInvocation<K,V>
-
toString
-