|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.labs.minion.indexer.dictionary.DiskDictionary
com.sun.labs.minion.indexer.dictionary.CachedDiskDictionary
public class CachedDiskDictionary
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.sun.labs.minion.indexer.dictionary.DiskDictionary |
|---|
DiskDictionary.DiskDictionaryIterator, DiskDictionary.HE, DiskDictionary.LightDiskDictionaryIterator, DiskDictionary.LookupState |
| Field Summary | |
|---|---|
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 | |
|---|---|
CachedDiskDictionary(java.lang.Class entryClass,
NameDecoder decoder,
java.io.RandomAccessFile dictFile,
java.io.RandomAccessFile[] postFiles)
Creates a disk dictionary that we can use for querying. |
|
CachedDiskDictionary(java.lang.Class entryClass,
NameDecoder decoder,
java.io.RandomAccessFile dictFile,
java.io.RandomAccessFile[] postFiles,
int postInType,
int nameBufferSize,
int offsetsBufferSize,
int infoBufferSize,
int infoOffsetsBufferSize,
Partition part)
Creates a disk dictionary that we can use for querying. |
|
CachedDiskDictionary(java.lang.Class entryClass,
NameDecoder decoder,
java.io.RandomAccessFile dictFile,
java.io.RandomAccessFile[] postFiles,
int postInType,
Partition part)
Creates a disk dictionary that we can use for querying. |
|
CachedDiskDictionary(java.lang.Class entryClass,
NameDecoder decoder,
java.io.RandomAccessFile dictFile,
java.io.RandomAccessFile[] postFiles,
Partition part)
Creates a disk dictionary that we can use for querying. |
|
| Method Summary | |
|---|---|
QueryEntry |
get(int id)
Gets a entry from the dictionary, given the ID for the entry. |
QueryEntry |
get(java.lang.Object name)
Gets a entry from the dictionary, given the name for the entry. |
DictionaryIterator |
iterator()
Gets an iterator for this dictionary. |
DictionaryIterator |
iterator(int begin,
int end)
Gets an iterator for the dictionary that starts and stops at the given indices in the dictionary. |
| Methods inherited from class com.sun.labs.minion.indexer.dictionary.DiskDictionary |
|---|
customSetup, find, findPos, findPos, get, get, getBufferedInputs, getBufferedInputs, getLookupState, getMatching, getMaxID, getPartition, getSpellingVariants, getStemMatches, getSubstring, 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 |
| Field Detail |
|---|
public static final java.lang.String logTag
| Constructor Detail |
|---|
public CachedDiskDictionary(java.lang.Class entryClass,
NameDecoder decoder,
java.io.RandomAccessFile dictFile,
java.io.RandomAccessFile[] postFiles)
throws java.io.IOException
entryClass - The class of the entries that the dictionary
contains.decoder - A decoder for the names in this dictionary.dictFile - The file containing the dictionary.postFiles - The files containing the postings associated with
the entries in this dictionary.
java.io.IOException - if there is any error opening the dictionary
public CachedDiskDictionary(java.lang.Class entryClass,
NameDecoder decoder,
java.io.RandomAccessFile dictFile,
java.io.RandomAccessFile[] postFiles,
Partition part)
throws java.io.IOException
entryClass - The class of the entries that the dictionary
contains.decoder - A decoder for the names in this dictionary.dictFile - The file containing the dictionary.postFiles - The files containing the postings associated with
the entries in this dictionary.part - The partition with which this dictionary is associated.
java.io.IOException - if there is any error opening the dictionary
public CachedDiskDictionary(java.lang.Class entryClass,
NameDecoder decoder,
java.io.RandomAccessFile dictFile,
java.io.RandomAccessFile[] postFiles,
int postInType,
Partition part)
throws java.io.IOException
entryClass - The class of the entries that the dictionary
contains.decoder - A decoder for the names in this dictionary.dictFile - The file containing the dictionary.postFiles - The files containing the postings associated with
the entries in this dictionary.postInType - The type of postings input to use.part - The partition with which this dictionary is associated.
java.io.IOException - if there is any error opening the dictionary
public CachedDiskDictionary(java.lang.Class entryClass,
NameDecoder decoder,
java.io.RandomAccessFile dictFile,
java.io.RandomAccessFile[] postFiles,
int postInType,
int nameBufferSize,
int offsetsBufferSize,
int infoBufferSize,
int infoOffsetsBufferSize,
Partition part)
throws java.io.IOException
nameBufferSize - the size of the buffer (in bytes) to use for the entry namesoffsetsBufferSize - the size of the buffer (in bytes) to use for the entry name offsetsinfoBufferSize - the size of the buffer (in bytes) to use for the entry informationinfoOffsetsBufferSize - the size of the buffer (in bytes) to use for the entry information offsetsentryClass - The class of the entries that the dictionary
contains.decoder - A decoder for the names in this dictionary.dictFile - The file containing the dictionary.postFiles - The files containing the postings associated with
the entries in this dictionary.postInType - The type of postings input to use.part - The partition with which this dictionary is associated.
java.io.IOException - if there is any error opening the dictionary| Method Detail |
|---|
public QueryEntry get(java.lang.Object name)
get in interface Dictionaryget in class DiskDictionaryname - The name of the entry to get.
null if
the name doesn't appear in the dictionary.public QueryEntry get(int id)
get in class DiskDictionaryid - the ID to find.
null if the ID doesn't occur in
our dictionary.public DictionaryIterator iterator()
DiskDictionary
iterator in interface Dictionaryiterator in interface java.lang.Iterable<QueryEntry>iterator in class DiskDictionaryMap.Entry interface
public DictionaryIterator iterator(int begin,
int end)
iterator in class DiskDictionarybegin - the beginning index in the dictionary, counting from
0. If this value is less than zero it will be clamped to zero.end - the ending index in the dictionary, counting from 0. If
this value is greater than the number of entries in the dictionary,
it will be limited to that number.
Map.Entry interface
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||