Class JCache<K,​V>

  • All Implemented Interfaces:
    AppCache<K,​V>

    public class JCache<K,​V>
    extends java.lang.Object
    implements AppCache<K,​V>
    Author:
    Loc Ha
    • Constructor Summary

      Constructors 
      Constructor Description
      JCache​(javax.cache.Cache<K,​V> cache)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()  
      boolean containsKey​(K key)  
      V get​(K key)  
      void put​(K key, V value)  
      boolean putIfAbsent​(K key, V value)  
      boolean remove​(K key)  
      boolean remove​(K key, V oldValue)  
      void removeAll​(java.util.Set<? extends K> keys)  
      boolean replace​(K key, V value)  
      boolean replace​(K key, V oldValue, V newValue)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JCache

        public JCache​(javax.cache.Cache<K,​V> cache)
    • Method Detail

      • get

        public V get​(K key)
        Specified by:
        get in interface AppCache<K,​V>
      • put

        public void put​(K key,
                        V value)
        Specified by:
        put in interface AppCache<K,​V>
      • putIfAbsent

        public boolean putIfAbsent​(K key,
                                   V value)
        Specified by:
        putIfAbsent in interface AppCache<K,​V>
      • containsKey

        public boolean containsKey​(K key)
        Specified by:
        containsKey in interface AppCache<K,​V>
      • remove

        public boolean remove​(K key)
        Specified by:
        remove in interface AppCache<K,​V>
      • remove

        public boolean remove​(K key,
                              V oldValue)
        Specified by:
        remove in interface AppCache<K,​V>
      • removeAll

        public void removeAll​(java.util.Set<? extends K> keys)
        Specified by:
        removeAll in interface AppCache<K,​V>
      • replace

        public boolean replace​(K key,
                               V value)
        Specified by:
        replace in interface AppCache<K,​V>
      • replace

        public boolean replace​(K key,
                               V oldValue,
                               V newValue)
        Specified by:
        replace in interface AppCache<K,​V>
      • clear

        public void clear()
        Specified by:
        clear in interface AppCache<K,​V>