Class CaffeineNearCacheService<K,V>

java.lang.Object
org.infinispan.client.hotrod.near.NearCacheService<K,V>
org.wildfly.clustering.cache.infinispan.remote.near.CaffeineNearCacheService<K,V>
Type Parameters:
K - cache key type
V - cache value type
All Implemented Interfaces:
Iterable<Map.Entry<K, org.infinispan.client.hotrod.MetadataValue<V>>>, org.infinispan.client.hotrod.near.NearCache<K,V>

public class CaffeineNearCacheService<K,V> extends org.infinispan.client.hotrod.near.NearCacheService<K,V>
Near cache service that constructs its near cache using a generic factory.
Author:
Paul Ferraro
  • Constructor Summary

    Constructors
    Constructor
    Description
    CaffeineNearCacheService(Supplier<com.github.benmanes.caffeine.cache.Cache<K, org.infinispan.client.hotrod.MetadataValue<V>>> factory, org.infinispan.client.hotrod.event.impl.ClientListenerNotifier listenerNotifier)
    Creates a Caffeine-based near cache service.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.infinispan.client.hotrod.near.NearCache<K,V>
    createNearCache(org.infinispan.client.hotrod.configuration.NearCacheConfiguration config, BiConsumer<K, org.infinispan.client.hotrod.MetadataValue<V>> removedConsumer)
     

    Methods inherited from class org.infinispan.client.hotrod.near.NearCacheService

    calculateBloomBits, clear, create, get, getBloomFilterBits, getConfig, getListenerId, iterator, putIfAbsent, remove, remove, replace, setInvalidationCallback, size, start, stop

    Methods inherited from class Object

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

    Methods inherited from interface Iterable

    forEach, spliterator
  • Constructor Details

    • CaffeineNearCacheService

      public CaffeineNearCacheService(Supplier<com.github.benmanes.caffeine.cache.Cache<K, org.infinispan.client.hotrod.MetadataValue<V>>> factory, org.infinispan.client.hotrod.event.impl.ClientListenerNotifier listenerNotifier)
      Creates a Caffeine-based near cache service.
      Parameters:
      factory - a factory for creating a Caffeine cache
      listenerNotifier - a notifier for client listeners
  • Method Details

    • createNearCache

      protected org.infinispan.client.hotrod.near.NearCache<K,V> createNearCache(org.infinispan.client.hotrod.configuration.NearCacheConfiguration config, BiConsumer<K, org.infinispan.client.hotrod.MetadataValue<V>> removedConsumer)
      Overrides:
      createNearCache in class org.infinispan.client.hotrod.near.NearCacheService<K,V>