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>
,org.infinispan.notifications.impl.ListenerInvocation<Event<K,V>>
public abstract class DelegatingCacheEntryListenerInvocation<K,V> extends java.lang.Object implements CacheEntryListenerInvocation<K,V>
A wrapper around aCacheEntryListenerInvocation
that keeps a reference to theFilterIndexingServiceProvider
instance that handles this invocation. All methods are delegated to the wrapped invocation exceptCacheEntryListenerInvocation.invoke(EventWrapper, boolean)
andListenerInvocation.invoke(Object)
. FilterIndexingServiceProvider implementors must extends this class and implement its abstractunregister()
method.- Since:
- 7.2
- Author:
- anistor@redhat.com
-
-
Field Summary
Fields Modifier and Type Field Description protected CacheEntryListenerInvocation<K,V>
invocation
-
Constructor Summary
Constructors Modifier Constructor Description protected
DelegatingCacheEntryListenerInvocation(CacheEntryListenerInvocation<K,V> invocation)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.Class<? extends java.lang.annotation.Annotation>
getAnnotation()
<C> CacheEventConverter<? super K,? super V,C>
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>> event, boolean isLocalNodePrimaryOwner)
Invokes the eventjava.util.concurrent.CompletionStage<java.lang.Void>
invokeNoChecks(EventWrapper<K,V,CacheEntryEvent<K,V>> event, boolean skipQueue, boolean skipConverter, boolean needsTransform)
Invokes the event without applying filters or convertersboolean
isClustered()
boolean
isSync()
abstract void
unregister()
Stops handling the invocation.boolean
useStorageFormat()
-
-
-
Field Detail
-
invocation
protected final CacheEntryListenerInvocation<K,V> invocation
-
-
Constructor Detail
-
DelegatingCacheEntryListenerInvocation
protected DelegatingCacheEntryListenerInvocation(CacheEntryListenerInvocation<K,V> invocation)
-
-
Method Detail
-
unregister
public abstract void unregister()
Stops handling the invocation. This is called when the listener is being unregistered.
-
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>
-
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>> event, boolean isLocalNodePrimaryOwner)
Description copied from interface:CacheEntryListenerInvocation
Invokes the event- Specified by:
invoke
in interfaceCacheEntryListenerInvocation<K,V>
- 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>> 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>
- 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
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>
-
getFilter
public CacheEventFilter<? super K,? super V> getFilter()
- Specified by:
getFilter
in interfaceCacheEntryListenerInvocation<K,V>
-
getConverter
public <C> CacheEventConverter<? super K,? super V,C> getConverter()
- Specified by:
getConverter
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
-
-