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 typeV- 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
ConstructorsConstructorDescriptionCaffeineNearCacheService(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 TypeMethodDescriptioncreateNearCache(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, stopMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 cachelistenerNotifier- 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)
-