Class CacheMap<K,​V>

  • Type Parameters:
    K - the key type
    V - the value type

    public class CacheMap<K,​V>
    extends java.lang.Object
    A cache map. This map supports re-opening the store if this is needed.

    Note that a failure to open the underlying store will be handled gracefully, in that the CacheMap can be constructed, but will not actually cache anything. The same is true for the case where the underlying store starts to fail and can not be re-opened.

    • Constructor Summary

      Constructors 
      Constructor Description
      CacheMap​(MapFactory factory, java.lang.String name, org.h2.mvstore.MVMap.Builder<K,​V> builder)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()  
      boolean containsKey​(java.lang.Object key)  
      V get​(java.lang.Object key)  
      V put​(K key, V value)  
      V remove​(java.lang.Object key)  
      • Methods inherited from class java.lang.Object

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

      • CacheMap

        public CacheMap​(MapFactory factory,
                        java.lang.String name,
                        org.h2.mvstore.MVMap.Builder<K,​V> builder)
    • Method Detail

      • put

        public V put​(K key,
                     V value)
      • get

        public V get​(java.lang.Object key)
      • containsKey

        public boolean containsKey​(java.lang.Object key)
      • remove

        public V remove​(java.lang.Object key)
      • clear

        public void clear()