com.sun.labs.minion.indexer.entry
Class MPCasedDFOEntry

java.lang.Object
  extended by com.sun.labs.minion.indexer.entry.BaseEntry
      extended by com.sun.labs.minion.indexer.entry.CasedEntry
          extended by com.sun.labs.minion.indexer.entry.CasedDFOEntry
              extended by com.sun.labs.minion.indexer.entry.MPCasedDFOEntry
All Implemented Interfaces:
CasedPostingsEntry, Entry, IndexEntry, QueryEntry, java.lang.Comparable

public class MPCasedDFOEntry
extends CasedDFOEntry


Field Summary
 
Fields inherited from class com.sun.labs.minion.indexer.entry.CasedDFOEntry
CI, CS, fnpSize, logTag, maxfdt, to
 
Fields inherited from class com.sun.labs.minion.indexer.entry.CasedEntry
ciEntry, n, offset, p, size, totalSize
 
Fields inherited from class com.sun.labs.minion.indexer.entry.BaseEntry
dict, id, name, postIn
 
Constructor Summary
MPCasedDFOEntry()
           
MPCasedDFOEntry(java.lang.Object name)
           
 
Method Summary
 void decodePostingsInfo(ReadableBuffer b, int pos)
          Decodes the postings information associated with this entry.
 void encodePostingsInfo(WriteableBuffer b)
          Encodes any information associated with the postings onto the given buffer.
 Entry getEntry()
          Duplicates the contents of this entry, except for any postings.
 Entry getEntry(java.lang.Object name)
          Gets a new entry with the given name.
 int getNumChannels()
          Returns the number of channels needed to store the postings for this entry type.
protected  void init()
          Initializes the arrays containing postings, sizes, etc.
 void readPostings()
          Reads the postings data for this entry.
 void readPostings(int pos)
          Reads the postings data for this entry.
 boolean writePostings(PostingsOutput[] out, int[] idMap)
          Writes the postings associated with this entry to some or all of the given channels.
 
Methods inherited from class com.sun.labs.minion.indexer.entry.CasedDFOEntry
addCaseInsensitive, addCaseSensitive, append, getCaseInsensitivePostings, getCaseSensitivePostings, getInstance, getMaxFDT, getN, getTotalOccurrences, hasFieldInformation, hasPositionInformation, initPostings, iterator, nameOccurred
 
Methods inherited from class com.sun.labs.minion.indexer.entry.CasedEntry
add, add, getCaseInsensitiveEntry, setCaseInsensitiveEntry
 
Methods inherited from class com.sun.labs.minion.indexer.entry.BaseEntry
compareTo, getID, getName, getPartition, setDictionary, setID, setName, setPostingsInput, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MPCasedDFOEntry

public MPCasedDFOEntry()

MPCasedDFOEntry

public MPCasedDFOEntry(java.lang.Object name)
Method Detail

getEntry

public Entry getEntry(java.lang.Object name)
Description copied from interface: Entry
Gets a new entry with the given name.

Specified by:
getEntry in interface Entry
Overrides:
getEntry in class CasedDFOEntry
Parameters:
name - the name that we want to give the entry.
Returns:
a new entry.

getEntry

public Entry getEntry()
Duplicates the contents of this entry, except for any postings.

Specified by:
getEntry in interface Entry
Overrides:
getEntry in class CasedDFOEntry
Returns:
a new entry.

init

protected void init()
Description copied from class: CasedEntry
Initializes the arrays containing postings, sizes, etc.

Overrides:
init in class CasedDFOEntry

getNumChannels

public int getNumChannels()
Returns the number of channels needed to store the postings for this entry type.

Specified by:
getNumChannels in interface Entry
Overrides:
getNumChannels in class CasedEntry

encodePostingsInfo

public void encodePostingsInfo(WriteableBuffer b)
Encodes any information associated with the postings onto the given buffer.

Specified by:
encodePostingsInfo in interface IndexEntry
Overrides:
encodePostingsInfo in class CasedDFOEntry
Parameters:
b - The buffer onto which the postings information should be encoded. The buffer will be positioned to the correct spot for the encoding.

writePostings

public boolean writePostings(PostingsOutput[] out,
                             int[] idMap)
                      throws java.io.IOException
Writes the postings associated with this entry to some or all of the given channels.

Specified by:
writePostings in interface IndexEntry
Overrides:
writePostings in class CasedDFOEntry
Parameters:
out - The outputs to which we will write the postings.
idMap - A map from the IDs currently used in the postings to the IDs that should be used when the postings are written to disk. This may be null, in which case no remapping will occur.
Returns:
true if postings were written, false otherwise
Throws:
java.io.IOException - if there is any error writing the postings.

decodePostingsInfo

public void decodePostingsInfo(ReadableBuffer b,
                               int pos)
Decodes the postings information associated with this entry.

Specified by:
decodePostingsInfo in interface QueryEntry
Overrides:
decodePostingsInfo in class CasedDFOEntry
Parameters:
b - The buffer containing the encoded postings information.
pos - The position in b where the postings information can be found.

readPostings

public void readPostings(int pos)
                  throws java.io.IOException
Reads the postings data for this entry. This method must load all available postings information, since this will be used at dictionary merge time to append postings from one entry onto another.

Overrides:
readPostings in class CasedDFOEntry
Throws:
java.io.IOException - if there is any error reading the postings.

readPostings

public void readPostings()
                  throws java.io.IOException
Reads the postings data for this entry. This method must load all available postings information, since this will be used at dictionary merge time to append postings from one entry onto another.

Specified by:
readPostings in interface QueryEntry
Overrides:
readPostings in class CasedDFOEntry
Throws:
java.io.IOException - if there is any error reading the postings.