com.sun.labs.minion.retrieval.cache
Class DocCache

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,V>
          extended by java.util.LinkedHashMap<K,V>
              extended by com.sun.labs.minion.util.LRACache<java.lang.String,DocCacheElement>
                  extended by com.sun.labs.minion.retrieval.cache.DocCache
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,DocCacheElement>

public class DocCache
extends LRACache<java.lang.String,DocCacheElement>

An LRA cache of terms and their associated postings.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Field Summary
protected  SearchEngine engine
           
protected  java.util.Map<DiskPartition,DictionaryIterator> m
           
protected  WeightingComponents wc
           
protected  WeightingFunction wf
           
 
Fields inherited from class com.sun.labs.minion.util.LRACache
DEFAULT_SIZE, lraSize
 
Constructor Summary
DocCache(int size, SearchEngine engine)
           
DocCache(int size, SearchEngine engine, WeightingFunction wf, WeightingComponents wc)
           
DocCache(SearchEngine engine)
           
 
Method Summary
 DocCacheElement get(DocKeyEntry dke, java.lang.String field, DiskPartition p)
           
 DocCacheElement get(java.lang.String key, java.lang.String field, DiskPartition p)
           
 WeightingComponents getWeightingComponents()
           
 WeightingFunction getWeightingFunction()
           
 
Methods inherited from class com.sun.labs.minion.util.LRACache
removeEldestEntry
 
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, get
 
Methods inherited from class java.util.HashMap
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Field Detail

engine

protected SearchEngine engine

wf

protected WeightingFunction wf

wc

protected WeightingComponents wc

m

protected java.util.Map<DiskPartition,DictionaryIterator> m
Constructor Detail

DocCache

public DocCache(SearchEngine engine)

DocCache

public DocCache(int size,
                SearchEngine engine)

DocCache

public DocCache(int size,
                SearchEngine engine,
                WeightingFunction wf,
                WeightingComponents wc)
Method Detail

get

public DocCacheElement get(java.lang.String key,
                           java.lang.String field,
                           DiskPartition p)

get

public DocCacheElement get(DocKeyEntry dke,
                           java.lang.String field,
                           DiskPartition p)

getWeightingComponents

public WeightingComponents getWeightingComponents()

getWeightingFunction

public WeightingFunction getWeightingFunction()