Class CacheEntriesTask<K,V>

java.lang.Object
org.wildfly.clustering.server.infinispan.scheduler.CacheEntriesTask<K,V>
Type Parameters:
K - cache key type
V - cache value type
All Implemented Interfaces:
Consumer<CacheStreamFilter<Map.Entry<K,V>>>, Consumer<CacheStreamFilter<Map.Entry<K,V>>>

public class CacheEntriesTask<K,V> extends Object implements Consumer<CacheStreamFilter<Map.Entry<K,V>>>
Invokes a task against cache entries matching a filter.
Author:
Paul Ferraro
  • Method Details

    • schedule

      public static <I, K extends Key<I>, V, M> Consumer<CacheStreamFilter<Map.Entry<K,V>>> schedule(org.infinispan.Cache<K,V> cache, Predicate<Map.Entry<? super K, ? super V>> filter, CacheEntryScheduler<K,V> scheduler)
      Creates a task that schedules entries matching the specified filter.
      Type Parameters:
      I - the cache key identifier type
      K - the cache key type
      V - the cache value type
      M - the group member type
      Parameters:
      cache - an embedded cache
      filter - a cache entry filter
      scheduler - the target scheduler
      Returns:
      a task that schedules entries matching the specified filter.
    • cancel

      public static <I, K extends Key<I>, V, M> Consumer<CacheStreamFilter<Map.Entry<K,V>>> cancel(org.infinispan.Cache<K,V> cache, Predicate<Map.Entry<? super K, ? super V>> filter, CacheEntryScheduler<K,V> scheduler)
      Creates a task that cancels entries matching the specified filter.
      Type Parameters:
      I - the cache key identifier type
      K - the cache key type
      V - the cache value type
      M - the group member type
      Parameters:
      cache - an embedded cache
      filter - a cache entry filter
      scheduler - the target scheduler
      Returns:
      a task that cancels entries matching the specified filter.
    • accept

      public void accept(CacheStreamFilter<Map.Entry<K,V>> filter)
      Specified by:
      accept in interface Consumer<K>