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>
annotation
protected boolean
clustered
protected CacheEventConverter<? super K,? super V,?>
converter
protected CacheEventFilter<? super K,? super V>
filter
protected boolean
filterAndConvert
protected java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>>
filterAnnotations
protected java.util.UUID
identifier
protected org.infinispan.notifications.impl.ListenerInvocation<Event<K,V>>
invocation
protected Listener.Observation
observation
protected boolean
onlyPrimary
protected boolean
sync
-
Constructor Summary
Constructors Modifier Constructor Description 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 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 java.util.concurrent.CompletionStage<java.lang.Void>
doRealInvocation(Event<K,V> event)
protected java.util.concurrent.CompletionStage<java.lang.Void>
doRealInvocation(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.UUID
getIdentifier()
DataConversion
getKeyDataConversion()
Listener.Observation
getObservation()
java.lang.Object
getTarget()
The listener instance that is notified of eventsDataConversion
getValueDataConversion()
java.util.concurrent.CompletionStage<java.lang.Void>
invoke(Event<K,V> event)
Invokes the eventjava.util.concurrent.CompletionStage<java.lang.Void>
invoke(EventWrapper<K,V,CacheEntryEvent<K,V>> wrapped, boolean isLocalNodePrimaryOwner)
This is the entry point for local listeners firing eventsjava.util.concurrent.CompletionStage<java.lang.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 firedboolean
isClustered()
boolean
isSync()
protected CacheEntryEvent<K,V>
shouldInvoke(CacheEntryEvent<K,V> event, boolean isLocalNodePrimaryOwner)
protected boolean
shouldInvoke(Event<K,V> event)
boolean
useStorageFormat()
-
-
-
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 java.util.concurrent.CompletionStage<java.lang.Void> invoke(Event<K,V> event)
Description copied from interface:org.infinispan.notifications.impl.ListenerInvocation
Invokes the event- Specified by:
invoke
in interfaceorg.infinispan.notifications.impl.ListenerInvocation<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 java.util.concurrent.CompletionStage<java.lang.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 java.util.concurrent.CompletionStage<java.lang.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
-- 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
protected java.util.concurrent.CompletionStage<java.lang.Void> doRealInvocation(EventWrapper<K,V,CacheEntryEvent<K,V>> event)
-
doRealInvocation
protected java.util.concurrent.CompletionStage<java.lang.Void> doRealInvocation(Event<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.ListenerInvocation
The listener instance that is notified of events- Specified by:
getTarget
in interfaceorg.infinispan.notifications.impl.ListenerInvocation<K>
-
getFilter
public CacheEventFilter<? super K,? super V> getFilter()
- Specified by:
getFilter
in interfaceCacheEntryListenerInvocation<K,V>
-
getFilterAnnotations
public java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> getFilterAnnotations()
- Specified by:
getFilterAnnotations
in interfaceCacheEntryListenerInvocation<K,V>
-
getKeyDataConversion
public DataConversion getKeyDataConversion()
- Specified by:
getKeyDataConversion
in interfaceCacheEntryListenerInvocation<K,V>
-
getValueDataConversion
public DataConversion 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
public CacheEventConverter<? super K,? super V,?> getConverter()
- Specified by:
getConverter
in interfaceCacheEntryListenerInvocation<K,V>
-
isClustered
public boolean isClustered()
- Specified by:
isClustered
in interfaceCacheEntryListenerInvocation<K,V>
-
getIdentifier
public java.util.UUID getIdentifier()
- Specified by:
getIdentifier
in interfaceCacheEntryListenerInvocation<K,V>
-
getObservation
public Listener.Observation getObservation()
- Specified by:
getObservation
in interfaceCacheEntryListenerInvocation<K,V>
-
getAnnotation
public java.lang.Class<? extends java.lang.annotation.Annotation> 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>
-
-