Class BlockingCacheEventListener<K,V>

java.lang.Object
org.wildfly.clustering.cache.infinispan.embedded.listener.NonBlockingCacheEventListener<K,V>
org.wildfly.clustering.cache.infinispan.embedded.listener.BlockingCacheEventListener<K,V>
Type Parameters:
K - cache key type
V - cache value type
All Implemented Interfaces:
Consumer<org.infinispan.notifications.cachelistener.event.CacheEntryEvent<K,V>>, Function<org.infinispan.notifications.cachelistener.event.CacheEntryEvent<K,V>, CompletionStage<Void>>

public class BlockingCacheEventListener<K,V> extends NonBlockingCacheEventListener<K,V>
Generic non-blocking event listener that delegates to a blocking event consumer.
Author:
Paul Ferraro
  • Constructor Details

    • BlockingCacheEventListener

      public BlockingCacheEventListener(org.infinispan.Cache<K,V> cache, Consumer<K> consumer)
      Creates a blocking cache event listener.
      Parameters:
      cache - the target cache
      consumer - a consumer of a cache key
    • BlockingCacheEventListener

      public BlockingCacheEventListener(org.infinispan.Cache<K,V> cache, BiConsumer<K,V> consumer)
      Creates a blocking cache event listener.
      Parameters:
      cache - the target cache
      consumer - a consumer of a cache entry
  • Method Details