Class CaffeineNearCache<K,​V>

  • All Implemented Interfaces:
    Iterable<Map.Entry<K,​org.infinispan.client.hotrod.MetadataValue<V>>>, org.infinispan.client.hotrod.near.NearCache<K,​V>

    public class CaffeineNearCache<K,​V>
    extends Object
    implements org.infinispan.client.hotrod.near.NearCache<K,​V>
    Near cache implementation based on a Caffeine cache.
    Author:
    Paul Ferraro
    • Constructor Detail

      • CaffeineNearCache

        public CaffeineNearCache​(com.github.benmanes.caffeine.cache.Cache<K,​org.infinispan.client.hotrod.MetadataValue<V>> cache)
    • Method Detail

      • put

        public void put​(K key,
                        org.infinispan.client.hotrod.MetadataValue<V> value)
        Specified by:
        put in interface org.infinispan.client.hotrod.near.NearCache<K,​V>
      • putIfAbsent

        public void putIfAbsent​(K key,
                                org.infinispan.client.hotrod.MetadataValue<V> value)
        Specified by:
        putIfAbsent in interface org.infinispan.client.hotrod.near.NearCache<K,​V>
      • remove

        public boolean remove​(K key)
        Specified by:
        remove in interface org.infinispan.client.hotrod.near.NearCache<K,​V>
      • get

        public org.infinispan.client.hotrod.MetadataValue<V> get​(K key)
        Specified by:
        get in interface org.infinispan.client.hotrod.near.NearCache<K,​V>
      • clear

        public void clear()
        Specified by:
        clear in interface org.infinispan.client.hotrod.near.NearCache<K,​V>
      • size

        public int size()
        Specified by:
        size in interface org.infinispan.client.hotrod.near.NearCache<K,​V>