org.cdlib.xtf.textIndexer
Class DocSelCache

Object
  extended by AbstractMap<K,V>
      extended by HashMap
          extended by DocSelCache
All Implemented Interfaces:
Serializable, Cloneable, Map

public class DocSelCache
extends HashMap

This class represents the contents of the Document Selector Cache maintained by the indexer. It provides for loading, saving, and searching the cache. The cache is underlain by a HashMap mapping String keys to Entry values.

See Also:
Serialized Form

Nested Class Summary
(package private) static class DocSelCache.Entry
          One entry in the docSelector cache
 
Nested classes/interfaces inherited from class AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Field Summary
 String dependencies
           
 HashMap<String,DocSelCache.Entry> map
           
 boolean modified
           
 
Constructor Summary
DocSelCache()
           
 
Method Summary
 void clear()
          Delegated to underlying map.
 boolean containsKey(String key)
          Delegated to underlying map.
 Set<Map.Entry<String,DocSelCache.Entry>> entrySet()
          Delegated to underlying map.
 DocSelCache.Entry get(String key)
          Delegated to underlying map.
 Set<String> keySet()
          Delegated to underlying map.
 void load(File file)
          Load a previously saved docSelector cache.
 DocSelCache.Entry put(String key, DocSelCache.Entry value)
          Delegated to underlying map.
 DocSelCache.Entry remove(Object key)
          Delegated to underlying map.
 void save(File file)
          Save the docSelector cache.
 int size()
          Delegated to underlying map.
 
Methods inherited from class HashMap
clone, containsKey, containsValue, get, isEmpty, put, putAll, values
 
Methods inherited from class AbstractMap
equals, hashCode, toString
 
Methods inherited from class Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface Map
equals, hashCode
 

Field Detail

dependencies

public String dependencies

map

public HashMap<String,DocSelCache.Entry> map

modified

public boolean modified
Constructor Detail

DocSelCache

public DocSelCache()
Method Detail

load

public void load(File file)
          throws IOException
Load a previously saved docSelector cache.

Parameters:
file - The file to load from.
Throws:
IOException - If something goes wrong reading the file.

save

public void save(File file)
          throws IOException
Save the docSelector cache.

Throws:
IOException

clear

public void clear()
Delegated to underlying map.

Specified by:
clear in interface Map
Overrides:
clear in class HashMap

containsKey

public boolean containsKey(String key)
Delegated to underlying map.


get

public DocSelCache.Entry get(String key)
Delegated to underlying map.


keySet

public Set<String> keySet()
Delegated to underlying map.

Specified by:
keySet in interface Map
Overrides:
keySet in class HashMap

put

public DocSelCache.Entry put(String key,
                             DocSelCache.Entry value)
Delegated to underlying map.


remove

public DocSelCache.Entry remove(Object key)
Delegated to underlying map.

Specified by:
remove in interface Map
Overrides:
remove in class HashMap

size

public int size()
Delegated to underlying map.

Specified by:
size in interface Map
Overrides:
size in class HashMap

entrySet

public Set<Map.Entry<String,DocSelCache.Entry>> entrySet()
Delegated to underlying map.

Specified by:
entrySet in interface Map
Overrides:
entrySet in class HashMap