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 aCacheEntryListenerInvocationthat keeps a reference to theFilterIndexingServiceProviderinstance 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 protectedDelegatingCacheEntryListenerInvocation(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.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>> event, boolean isLocalNodePrimaryOwner)voidinvokeNoChecks(EventWrapper<K,V,CacheEntryEvent<K,V>> event, boolean skipQueue, boolean skipConverter, boolean needsTransform)booleanisClustered()booleanisSync()abstract voidunregister()Stops handling the invocation.booleanuseStorageFormat()
-
-
-
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.ListenerInvocationThe listener instance that is notified of events- Specified by:
getTargetin interfaceorg.infinispan.notifications.impl.ListenerInvocation<K>
-
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>> event, boolean isLocalNodePrimaryOwner)
- Specified by:
invokein interfaceCacheEntryListenerInvocation<K,V>
-
invokeNoChecks
public void invokeNoChecks(EventWrapper<K,V,CacheEntryEvent<K,V>> event, boolean skipQueue, boolean skipConverter, boolean needsTransform)
- Specified by:
invokeNoChecksin interfaceCacheEntryListenerInvocation<K,V>
-
isClustered
public boolean isClustered()
- Specified by:
isClusteredin interfaceCacheEntryListenerInvocation<K,V>
-
isSync
public boolean isSync()
- Specified by:
isSyncin 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>
-
getFilter
public CacheEventFilter<? super K,? super V> getFilter()
- Specified by:
getFilterin interfaceCacheEntryListenerInvocation<K,V>
-
getConverter
public <C> CacheEventConverter<? super K,? super V,C> getConverter()
- Specified by:
getConverterin 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
-
-