Class CacheNotifierImpl.BaseCacheEntryListenerInvocation<K,V>
- java.lang.Object
-
- org.infinispan.notifications.cachelistener.CacheNotifierImpl.BaseCacheEntryListenerInvocation<K,V>
-
- All Implemented Interfaces:
CacheEntryListenerInvocation<K,V>,org.infinispan.notifications.impl.ListenerInvocation<Event<K,V>>
- Direct Known Subclasses:
CacheNotifierImpl.ClusteredListenerInvocation
- Enclosing class:
- CacheNotifierImpl<K,V>
protected static class CacheNotifierImpl.BaseCacheEntryListenerInvocation<K,V> extends java.lang.Object implements CacheEntryListenerInvocation<K,V>
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Class<? extends java.lang.annotation.Annotation>annotationprotected booleanclusteredprotected CacheEventConverter<? super K,? super V,?>converterprotected CacheEventFilter<? super K,? super V>filterprotected booleanfilterAndConvertprotected java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>>filterAnnotationsprotected java.util.UUIDidentifierprotected org.infinispan.notifications.impl.ListenerInvocation<Event<K,V>>invocationprotected Listener.Observationobservationprotected booleanonlyPrimaryprotected booleansync
-
Constructor Summary
Constructors Modifier Constructor Description protectedBaseCacheEntryListenerInvocation(org.infinispan.notifications.impl.ListenerInvocation<Event<K,V>> invocation, CacheEventFilter<? super K,? super V> filter, CacheEventConverter<? super K,? super V,?> converter, java.lang.Class<? extends java.lang.annotation.Annotation> annotation, boolean onlyPrimary, boolean clustered, java.util.UUID identifier, boolean sync, Listener.Observation observation, java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> filterAnnotations, DataConversion keyDataConversion, DataConversion valueDataConversion, boolean useStorageFormat)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CacheEntryEvent<K,V>convertValue(CacheEventConverter<? super K,? super V,?> converter, CacheEntryEvent<K,V> event)protected voiddoRealInvocation(Event<K,V> event)protected voiddoRealInvocation(EventWrapper<K,V,CacheEntryEvent<K,V>> event)java.lang.Class<? extends java.lang.annotation.Annotation>getAnnotation()CacheEventConverter<? super K,? super V,?>getConverter()CacheEventFilter<? super K,? super V>getFilter()java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>>getFilterAnnotations()java.util.UUIDgetIdentifier()DataConversiongetKeyDataConversion()Listener.ObservationgetObservation()java.lang.ObjectgetTarget()The listener instance that is notified of eventsDataConversiongetValueDataConversion()voidinvoke(Event<K,V> event)Invokes the eventvoidinvoke(EventWrapper<K,V,CacheEntryEvent<K,V>> wrapped, boolean isLocalNodePrimaryOwner)This is the entry point for local listeners firing eventsvoidinvokeNoChecks(EventWrapper<K,V,CacheEntryEvent<K,V>> wrapped, boolean skipQueue, boolean skipConverter, boolean needsTransform)This is the entry point for remote listener events being firedbooleanisClustered()booleanisSync()protected CacheEntryEvent<K,V>shouldInvoke(CacheEntryEvent<K,V> event, boolean isLocalNodePrimaryOwner)protected booleanshouldInvoke(Event<K,V> event)booleanuseStorageFormat()
-
-
-
Field Detail
-
invocation
protected final org.infinispan.notifications.impl.ListenerInvocation<Event<K,V>> invocation
-
filter
protected final CacheEventFilter<? super K,? super V> filter
-
converter
protected final CacheEventConverter<? super K,? super V,?> converter
-
onlyPrimary
protected final boolean onlyPrimary
-
clustered
protected final boolean clustered
-
identifier
protected final java.util.UUID identifier
-
annotation
protected final java.lang.Class<? extends java.lang.annotation.Annotation> annotation
-
sync
protected final boolean sync
-
filterAndConvert
protected final boolean filterAndConvert
-
observation
protected final Listener.Observation observation
-
filterAnnotations
protected final java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> filterAnnotations
-
-
Constructor Detail
-
BaseCacheEntryListenerInvocation
protected BaseCacheEntryListenerInvocation(org.infinispan.notifications.impl.ListenerInvocation<Event<K,V>> invocation, CacheEventFilter<? super K,? super V> filter, CacheEventConverter<? super K,? super V,?> converter, java.lang.Class<? extends java.lang.annotation.Annotation> annotation, boolean onlyPrimary, boolean clustered, java.util.UUID identifier, boolean sync, Listener.Observation observation, java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> filterAnnotations, DataConversion keyDataConversion, DataConversion valueDataConversion, boolean useStorageFormat)
-
-
Method Detail
-
invoke
public void invoke(Event<K,V> event)
Description copied from interface:org.infinispan.notifications.impl.ListenerInvocationInvokes the event- Specified by:
invokein interfaceorg.infinispan.notifications.impl.ListenerInvocation<K>
-
invoke
public 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-
-
invokeNoChecks
public 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-
-
doRealInvocation
protected void doRealInvocation(EventWrapper<K,V,CacheEntryEvent<K,V>> event)
-
shouldInvoke
protected CacheEntryEvent<K,V> shouldInvoke(CacheEntryEvent<K,V> event, boolean isLocalNodePrimaryOwner)
-
getTarget
public java.lang.Object getTarget()
Description copied from interface:org.infinispan.notifications.impl.ListenerInvocationThe listener instance that is notified of events- Specified by:
getTargetin interfaceorg.infinispan.notifications.impl.ListenerInvocation<K>
-
getFilter
public CacheEventFilter<? super K,? super V> getFilter()
- Specified by:
getFilterin interfaceCacheEntryListenerInvocation<K,V>
-
getFilterAnnotations
public java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> getFilterAnnotations()
- Specified by:
getFilterAnnotationsin interfaceCacheEntryListenerInvocation<K,V>
-
getKeyDataConversion
public DataConversion getKeyDataConversion()
- Specified by:
getKeyDataConversionin interfaceCacheEntryListenerInvocation<K,V>
-
getValueDataConversion
public DataConversion 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
public CacheEventConverter<? super K,? super V,?> getConverter()
- Specified by:
getConverterin interfaceCacheEntryListenerInvocation<K,V>
-
isClustered
public boolean isClustered()
- Specified by:
isClusteredin interfaceCacheEntryListenerInvocation<K,V>
-
getIdentifier
public java.util.UUID getIdentifier()
- Specified by:
getIdentifierin interfaceCacheEntryListenerInvocation<K,V>
-
getObservation
public Listener.Observation getObservation()
- Specified by:
getObservationin interfaceCacheEntryListenerInvocation<K,V>
-
getAnnotation
public java.lang.Class<? extends java.lang.annotation.Annotation> 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>
-
-