|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.labs.minion.indexer.dictionary.DiskDictionary com.sun.labs.minion.indexer.dictionary.UncachedTermStatsDictionary
public class UncachedTermStatsDictionary
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.sun.labs.minion.indexer.dictionary.DiskDictionary |
---|
DiskDictionary.DiskDictionaryIterator, DiskDictionary.LightDiskDictionaryIterator, DiskDictionary.LookupState |
Field Summary | |
---|---|
static int |
BUFFER_SIZE
|
static java.lang.String |
logTag
|
Fields inherited from class com.sun.labs.minion.indexer.dictionary.DiskDictionary |
---|
CHANNEL_FULL_POST, CHANNEL_PART_POST, decoder, dh, dictFile, entryClass, entryInfo, entryInfoOffsets, FILE_FULL_POST, FILE_PART_POST, idToPosn, nameCache, nameOffsets, names, nLoads, part, posnCache, postFiles, postIn, totalSize |
Constructor Summary | |
---|---|
UncachedTermStatsDictionary()
|
|
UncachedTermStatsDictionary(java.io.File df)
Creates a term statistics dictinary |
Method Summary | |
---|---|
boolean |
close(long currTime)
Close this thing. |
static void |
create(java.lang.String indexDir,
java.io.File df)
Creates an empty term stats dictionary. |
void |
createRemoveFile()
|
long |
getCloseTime()
|
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 an iterator and keeps a count of extant references to the dictionary, so that we know when a dictionary is no longer in use. |
DictionaryIterator |
iterator(boolean ref)
Gets an iterator. |
void |
recalculateTermStats(java.io.File df,
java.util.List<DiskPartition> parts)
Creates a term stats dictionary from a number of partitions. |
void |
setCloseTime(long closeTime)
|
Methods inherited from class com.sun.labs.minion.indexer.dictionary.DiskDictionary |
---|
customSetup, find, findPos, findPos, get, get, get, get, getBufferedInputs, getBufferedInputs, getLookupState, getMatching, getMaxID, getPartition, getSpellingVariants, getStemMatches, getSubstring, iterator, iterator, iterator, literator, merge, merge, newEntry, newEntry, put, remapPostings, setCacheSize, setPartition, setUpBuffers, size |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.sun.labs.minion.indexer.dictionary.TermStatsDictionary |
---|
size |
Field Detail |
---|
public static int BUFFER_SIZE
public static final java.lang.String logTag
Constructor Detail |
---|
public UncachedTermStatsDictionary()
public UncachedTermStatsDictionary(java.io.File df) throws java.io.IOException
df
- the file from which the terms statistics dictionary will
be read
java.io.IOException
- if there is any error opening the dictionaryMethod Detail |
---|
public TermStatsEntry getTermStats(java.lang.String term)
TermStatsDictionary
getTermStats
in interface TermStatsDictionary
null
if that term does not occur in the indexpublic void setCloseTime(long closeTime)
setCloseTime
in interface Closeable
public long getCloseTime()
getCloseTime
in interface Closeable
public void createRemoveFile()
createRemoveFile
in interface Closeable
public void recalculateTermStats(java.io.File df, java.util.List<DiskPartition> parts) throws java.io.IOException
df
- the file where the term stats dictionary will be writtenparts
- the partitions whose dictionaries will be included
java.io.IOException
public boolean close(long currTime)
Closeable
close
in interface Closeable
currTime
- the current time. If the time that the thing is supposed
to be closed is before the current time, then it will be closed.
true
if the thing was closed, false
otherwise.public static void create(java.lang.String indexDir, java.io.File df)
indexDir
- the directory where the term statistics dictionary
should be createddf
- the file that should be created for the dictionarypublic DictionaryIterator iterator(boolean ref)
iterator
in interface TermStatsDictionary
ref
- if true
then we will keep a reference count for
this dictionary so that we don't close the file while it's in use. If
false
this dictionary may be closed during iteration.
TermStatsDictionary.iterationDone()
public DictionaryIterator iterator()
iterator
in interface Dictionary
iterator
in interface TermStatsDictionary
iterator
in interface java.lang.Iterable<QueryEntry>
iterator
in class DiskDictionary
Map.Entry
interfacepublic void iterationDone()
TermStatsDictionary
iterationDone
in interface TermStatsDictionary
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |