Class 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
    • Constructor Detail

      • CacheEventFilterAsKeyValueFilter

        public CacheEventFilterAsKeyValueFilter​(CacheEventFilter<K,​V> filter)
    • Method Detail

      • accept

        public boolean accept​(K key,
                              V value,
                              Metadata metadata)
        Specified by:
        accept in interface KeyValueFilter<K,​V>
        Parameters:
        key - key to test
        value - 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)