Class PersistentMap<V>
- All Implemented Interfaces:
Closeable, AutoCloseable, Map<String,V>
Implements a low performance but easy to use map that is backed on a
directory. All objects are stored as JSON objects and therefore should be
DTOs. Each key is a file name and the contents is the value encoded in JSON.
The PersistentMap will attempt to lock the directory. This is a
non-concurrent implementation so you must ensure it is only used in a single
thread. It cannot of course also not share the data directory.
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractMap
clone, containsKey, containsValue, equals, get, hashCode, isEmpty, putAll, remove, size, valuesMethods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
PersistentMap
-
PersistentMap
-
PersistentMap
-
PersistentMap
-
-
Method Details
-
entrySet
-
put
-
remove
-
clear
-
keySet
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
toString
- Overrides:
toStringin classAbstractMap<String,V>
-
clear
public void clear(long whenOlder)
-