org.apache.jackrabbit.core.persistence.util
Class FileBasedIndex

java.lang.Object
  extended by org.apache.jackrabbit.core.persistence.util.HashMapIndex
      extended by org.apache.jackrabbit.core.persistence.util.FileBasedIndex
All Implemented Interfaces:
StringIndex

public class FileBasedIndex
extends HashMapIndex

Implements a StringIndex that 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
FileBasedIndex(FileSystemResource file)
          Creates a new hashmap index and loads the lookup tables from the filesystem resource.
 
Method Summary
protected  void load()
          Loads the lookup table from the filesystem resource.
protected  void save()
          Saves the lookup table to the filesystem resource.
 
Methods inherited from class org.apache.jackrabbit.core.persistence.util.HashMapIndex
indexToString, stringToIndex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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:
load in class HashMapIndex

save

protected void save()
Saves the lookup table to the filesystem resource.

Overrides:
save in class HashMapIndex


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.