Class NonBlockingCacheEventListener<K,V>

java.lang.Object
org.wildfly.clustering.infinispan.listener.NonBlockingCacheEventListener<K,V>
All Implemented Interfaces:
Consumer<org.infinispan.notifications.cachelistener.event.CacheEntryEvent<K,V>>, Function<org.infinispan.notifications.cachelistener.event.CacheEntryEvent<K,V>,CompletionStage<Void>>
Direct Known Subclasses:
BlockingCacheEventListener

public class NonBlockingCacheEventListener<K,V> extends Object implements Function<org.infinispan.notifications.cachelistener.event.CacheEntryEvent<K,V>,CompletionStage<Void>>, Consumer<org.infinispan.notifications.cachelistener.event.CacheEntryEvent<K,V>>
Generic non-blocking event listener that delegates to a non-blocking event consumer.
Author:
Paul Ferraro
  • Constructor Details

    • NonBlockingCacheEventListener

      public NonBlockingCacheEventListener(Consumer<K> consumer)
    • NonBlockingCacheEventListener

      public NonBlockingCacheEventListener(BiConsumer<K,V> consumer)
  • Method Details

    • apply

      public CompletionStage<Void> apply(org.infinispan.notifications.cachelistener.event.CacheEntryEvent<K,V> event)
      Specified by:
      apply in interface Function<K,V>
    • accept

      public void accept(org.infinispan.notifications.cachelistener.event.CacheEntryEvent<K,V> event)
      Specified by:
      accept in interface Consumer<K>