Class MemAppCache<K,​V>

  • All Implemented Interfaces:
    com.appslandia.common.caching.AppCache<K,​V>

    public class MemAppCache<K,​V>
    extends Object
    implements com.appslandia.common.caching.AppCache<K,​V>
    Author:
    Loc Ha
    • Constructor Detail

      • MemAppCache

        public MemAppCache​(String name)
      • MemAppCache

        public MemAppCache​(String name,
                           int size)
    • Method Detail

      • getName

        public String getName()
      • get

        public V get​(K key)
        Specified by:
        get in interface com.appslandia.common.caching.AppCache<K,​V>
      • put

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

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

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

        public boolean remove​(K key)
        Specified by:
        remove in interface com.appslandia.common.caching.AppCache<K,​V>
      • remove

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

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

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

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

        public void clear()
        Specified by:
        clear in interface com.appslandia.common.caching.AppCache<K,​V>