Interface CacheEventFilterConverter<K,V,C>
-
- All Superinterfaces:
CacheEventConverter<K,V,C>
,CacheEventFilter<K,V>
- All Known Subinterfaces:
IndexedFilter<K,V,C>
- All Known Implementing Classes:
AbstractCacheEventFilterConverter
,KeyValueFilterConverterAsCacheEventFilterConverter
public interface CacheEventFilterConverter<K,V,C> extends CacheEventFilter<K,V>, CacheEventConverter<K,V,C>
This interface is an optimization that can be used when an event filter and converter are most efficiently used as the same object composing the filtering and conversion in the same method invocation.- Since:
- 7.0
- Author:
- wburns
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description C
filterAndConvert(K key, V oldValue, Metadata oldMetadata, V newValue, Metadata newMetadata, EventType eventType)
Will both filter the entry and if passed subsequently convert the value to a new value.default org.infinispan.commons.dataconversion.MediaType
format()
-
Methods inherited from interface org.infinispan.notifications.cachelistener.filter.CacheEventConverter
convert, useRequestFormat
-
Methods inherited from interface org.infinispan.notifications.cachelistener.filter.CacheEventFilter
accept
-
-
-
-
Method Detail
-
filterAndConvert
C filterAndConvert(K key, V oldValue, Metadata oldMetadata, V newValue, Metadata newMetadata, EventType eventType)
Will both filter the entry and if passed subsequently convert the value to a new value. A returned value ofnull
will symbolize the value not passing the filter, so ensure your conversion will not returnnull
if you want this entry to be returned.- Parameters:
key
- The key for the entry that was changed for the eventoldValue
- The previous value before the event takes placeoldMetadata
- The old value before the event takes placenewValue
- The new value for the entry after the event takes placenewMetadata
- The new metadata for the entry after the event takes placeeventType
- The type of event that is being raised- Returns:
- A non
null
value converted value when it also passes the filter ornull
for when it doesn't pass the filter
-
format
default org.infinispan.commons.dataconversion.MediaType format()
- Specified by:
format
in interfaceCacheEventConverter<K,V,C>
- Specified by:
format
in interfaceCacheEventFilter<K,V>
- Returns:
- The desired data format to be used in the accept operation. If null, the filter will receive data as it's stored.
-
-