Class KeyFilter<K>

java.lang.Object
org.wildfly.clustering.cache.infinispan.embedded.listener.KeyFilter<K>
Type Parameters:
K - cache key type
All Implemented Interfaces:
org.infinispan.notifications.cachelistener.filter.CacheEventFilter<K,Object>

public class KeyFilter<K> extends Object implements org.infinispan.notifications.cachelistener.filter.CacheEventFilter<K,Object>
A CacheEventFilter for filtering events based on the cache key.
Author:
Paul Ferraro
  • Constructor Summary

    Constructors
    Constructor
    Description
    KeyFilter(Class<? super K> keyClass)
    Creates a filter that accepts keys of the specified class.
    KeyFilter(Predicate<? super K> predicate)
    Creates a filter that accepts keys matching the specified predicate.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    accept(K key, Object oldValue, org.infinispan.metadata.Metadata oldMetadata, Object newValue, org.infinispan.metadata.Metadata newMetadata, org.infinispan.notifications.cachelistener.filter.EventType eventType)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.infinispan.notifications.cachelistener.filter.CacheEventFilter

    format
  • Constructor Details

    • KeyFilter

      public KeyFilter(Class<? super K> keyClass)
      Creates a filter that accepts keys of the specified class.
      Parameters:
      keyClass - a key class
    • KeyFilter

      public KeyFilter(Predicate<? super K> predicate)
      Creates a filter that accepts keys matching the specified predicate.
      Parameters:
      predicate - a key predicate
  • Method Details

    • accept

      public boolean accept(K key, Object oldValue, org.infinispan.metadata.Metadata oldMetadata, Object newValue, org.infinispan.metadata.Metadata newMetadata, org.infinispan.notifications.cachelistener.filter.EventType eventType)
      Specified by:
      accept in interface org.infinispan.notifications.cachelistener.filter.CacheEventFilter<K,Object>