Class FileBasedIndex
- java.lang.Object
-
- org.apache.jackrabbit.core.persistence.util.HashMapIndex
-
- org.apache.jackrabbit.core.persistence.util.FileBasedIndex
-
- All Implemented Interfaces:
StringIndex
public class FileBasedIndex extends HashMapIndex
Implements aStringIndexthat is based on a hashmap and persists the names as property file.
-
-
Field Summary
-
Fields inherited from class org.apache.jackrabbit.core.persistence.util.HashMapIndex
indexToString, stringToIndex
-
-
Constructor Summary
Constructors Constructor Description FileBasedIndex(FileSystemResource file)Creates a new hashmap index and loads the lookup tables from the filesystem resource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidload()Loads the lookup table from the filesystem resource.protected voidsave()Saves the lookup table to the filesystem resource.-
Methods inherited from class org.apache.jackrabbit.core.persistence.util.HashMapIndex
indexToString, stringToIndex
-
-
-
-
Constructor Detail
-
FileBasedIndex
public FileBasedIndex(FileSystemResource file) throws FileSystemException, IOException
Creates a new hashmap index and loads the lookup tables from the filesystem resource. If it does not exist yet, it will create a new one.- Parameters:
file- the filesystem resource that stores the lookup tables.- Throws:
IOException- if an I/O error occurs.FileSystemException- if an I/O error occurs.
-
-
Method Detail
-
load
protected void load()
Loads the lookup table from the filesystem resource.- Overrides:
loadin classHashMapIndex
-
save
protected void save()
Saves the lookup table to the filesystem resource.- Overrides:
savein classHashMapIndex
-
-