Class AbstractDiskMap<K,​V>

    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int maxDepth  
      private java.io.File path  
      private static long serialVersionUID  
      private boolean useGZip  
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractDiskMap​(java.io.File path, boolean useGZip)  
    • Field Detail

      • path

        private java.io.File path
      • useGZip

        private boolean useGZip
      • maxDepth

        private int maxDepth
    • Constructor Detail

      • AbstractDiskMap

        public AbstractDiskMap​(java.io.File path,
                               boolean useGZip)
                        throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getPath

        public final java.io.File getPath()
      • size

        public final int size()
        Specified by:
        size in interface java.util.Map<K,​V>
        Specified by:
        size in class AbstractMap<K,​V>
      • getFileNameForKey

        private final java.io.File getFileNameForKey​(java.lang.Object o)
                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • remove

        public final V remove​(java.lang.Object key)
        Specified by:
        remove in interface java.util.Map<K,​V>
        Specified by:
        remove in class AbstractMap<K,​V>
      • containsKey

        public final boolean containsKey​(java.lang.Object key)
        Specified by:
        containsKey in interface java.util.Map<K,​V>
        Overrides:
        containsKey in class AbstractMap<K,​V>
      • keySet

        public final java.util.Set<K> keySet()
        Specified by:
        keySet in interface java.util.Map<K,​V>
        Specified by:
        keySet in class AbstractMap<K,​V>
      • listFilesToSet

        private void listFilesToSet​(java.io.File path,
                                    java.util.Set<K> set)
                             throws java.lang.ClassNotFoundException,
                                    java.io.IOException
        Throws:
        java.lang.ClassNotFoundException
        java.io.IOException
      • getKeyForFile

        private K getKeyForFile​(java.io.File file)
                         throws java.lang.ClassNotFoundException,
                                java.io.IOException
        Throws:
        java.lang.ClassNotFoundException
        java.io.IOException
      • clear

        public final void clear()
        Specified by:
        clear in interface java.util.Map<K,​V>
        Specified by:
        clear in class AbstractMap<K,​V>
      • erase

        public final void erase()
                         throws java.io.IOException
        Specified by:
        erase in interface Erasable
        Throws:
        java.io.IOException
      • setPath

        public final void setPath​(java.io.File path)
      • put

        public final V put​(K key,
                           V value)
        Specified by:
        put in interface java.util.Map<K,​V>
        Specified by:
        put in class AbstractMap<K,​V>
      • get

        public final V get​(java.lang.Object key)
        Specified by:
        get in interface java.util.Map<K,​V>
        Specified by:
        get in class AbstractMap<K,​V>
      • writeValue

        public abstract void writeValue​(java.io.OutputStream os,
                                        V value)
      • readValue

        public abstract V readValue​(java.io.InputStream is)