Class CacheEventFilterAsKeyValueFilter<K,V>
- java.lang.Object
-
- org.infinispan.notifications.cachelistener.filter.CacheEventFilterAsKeyValueFilter<K,V>
-
- All Implemented Interfaces:
KeyValueFilter<K,V>
public class CacheEventFilterAsKeyValueFilter<K,V> extends Object implements KeyValueFilter<K,V>
KeyValueFilter that is implemented by using the provided CacheEventFilter. The provided event type will always be one that is not retried, post and of type CREATE, The old value and old metadata in both pre and post events will be the data that was in the cache before the event occurs. The new value and new metadata in both pre and post events will be the data that is in the cache after the event occurs.- Since:
- 7.0
- Author:
- wburns
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCacheEventFilterAsKeyValueFilter.Externalizer
-
Constructor Summary
Constructors Constructor Description CacheEventFilterAsKeyValueFilter(CacheEventFilter<K,V> filter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(K key, V value, Metadata metadata)protected voidinjectDependencies(org.infinispan.factories.ComponentRegistry cr)-
Methods inherited from interface org.infinispan.filter.KeyValueFilter
format
-
-
-
-
Constructor Detail
-
CacheEventFilterAsKeyValueFilter
public CacheEventFilterAsKeyValueFilter(CacheEventFilter<K,V> filter)
-
-
Method Detail
-
accept
public boolean accept(K key, V value, Metadata metadata)
- Specified by:
acceptin interfaceKeyValueFilter<K,V>- Parameters:
key- key to testvalue- value to use (could be null for the case of removal)metadata- metadata- Returns:
- true if the given key is accepted by this filter.
-
injectDependencies
protected void injectDependencies(org.infinispan.factories.ComponentRegistry cr)
-
-