com.sun.labs.minion.indexer.dictionary
Interface TermStatsDictionary

All Superinterfaces:
Closeable
All Known Implementing Classes:
CachedTermStatsDictionary, UncachedTermStatsDictionary

public interface TermStatsDictionary
extends Closeable

An interface for term statistics dictionaries, so that we can configure different kinds of dictionaries for different situations.


Method Summary
 TermStatsEntry getTermStats(java.lang.String term)
          Gets the term statistics associated with the give term.
 void iterationDone()
          Indicates that a reference counted iterator for this dictionary is no longer in use, so a reference may be removed.
 DictionaryIterator iterator()
          Gets a reference-counted iterator for this dictionary.
 DictionaryIterator iterator(boolean ref)
          Gets an iterator for this dictionary that may be reference counted.
 int size()
          Gets the number of entries in the dictionary.
 
Methods inherited from interface com.sun.labs.minion.indexer.Closeable
close, createRemoveFile, getCloseTime, setCloseTime
 

Method Detail

size

int size()
Gets the number of entries in the dictionary.

Returns:
the number of entries in the dictionary

getTermStats

TermStatsEntry getTermStats(java.lang.String term)
Gets the term statistics associated with the give term.

Returns:
the term statistics associated with the given term, or null if that term does not occur in the index

iterator

DictionaryIterator iterator(boolean ref)
Gets an iterator for this dictionary that may be reference counted.

Parameters:
ref - if true then references to the iterator for a dictionary will be counted, and the dictionary will not be allowed to be closed until all references are released. References can be released by calling the iterationDone method
See Also:
iterationDone()

iterationDone

void iterationDone()
Indicates that a reference counted iterator for this dictionary is no longer in use, so a reference may be removed.


iterator

DictionaryIterator iterator()
Gets a reference-counted iterator for this dictionary.