Package com.logicaldoc.impex
Class ArchiveCache
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<String,String>
-
- com.logicaldoc.impex.ArchiveCache
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,String>
public class ArchiveCache extends HashMap<String,String>
Implements a cache of imported documents, basically an archive cache is a Map (index_document_id - document_id).- Since:
- 4.5
- Author:
- Matteo Caruso - LogicalDOC
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description ArchiveCache(File file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
append()
Appends the last entry to the fileFile
getFile()
String
put(String key, String value)
void
read()
Reads all data from filevoid
write()
Writes all entries into the file-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
-
-
-
Constructor Detail
-
ArchiveCache
public ArchiveCache(File file) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getFile
public File getFile()
-
read
public void read() throws IOException
Reads all data from file- Throws:
IOException
- cannot read the cache file
-
write
public void write() throws IOException
Writes all entries into the file- Throws:
IOException
- cannot write the cache file
-
append
public void append() throws IOException
Appends the last entry to the file- Throws:
IOException
- cannot write the cache file
-
-