org.apache.lucene.codecs.lucene40
Class Lucene40SkipListWriter

java.lang.Object
  extended by org.apache.lucene.codecs.MultiLevelSkipListWriter
      extended by org.apache.lucene.codecs.lucene40.Lucene40SkipListWriter

public class Lucene40SkipListWriter
extends MultiLevelSkipListWriter

Implements the skip list writer for the 4.0 posting list format that stores positions and payloads.

See Also:
Lucene40PostingsFormat
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
 
Fields inherited from class org.apache.lucene.codecs.MultiLevelSkipListWriter
numberOfSkipLevels
 
Constructor Summary
Lucene40SkipListWriter(int skipInterval, int numberOfSkipLevels, int docCount, IndexOutput freqOutput, IndexOutput proxOutput)
          Sole constructor.
 
Method Summary
 void resetSkip()
          Creates new buffers or empties the existing ones
 void setSkipData(int doc, boolean storePayloads, int payloadLength, boolean storeOffsets, int offsetLength)
          Sets the values for the current skip data.
protected  void writeSkipData(int level, IndexOutput skipBuffer)
          Subclasses must implement the actual skip data encoding in this method.
 
Methods inherited from class org.apache.lucene.codecs.MultiLevelSkipListWriter
bufferSkip, init, writeSkip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Lucene40SkipListWriter

public Lucene40SkipListWriter(int skipInterval,
                              int numberOfSkipLevels,
                              int docCount,
                              IndexOutput freqOutput,
                              IndexOutput proxOutput)
Sole constructor.

Method Detail

setSkipData

public void setSkipData(int doc,
                        boolean storePayloads,
                        int payloadLength,
                        boolean storeOffsets,
                        int offsetLength)
Sets the values for the current skip data.


resetSkip

public void resetSkip()
Description copied from class: MultiLevelSkipListWriter
Creates new buffers or empties the existing ones

Overrides:
resetSkip in class MultiLevelSkipListWriter

writeSkipData

protected void writeSkipData(int level,
                             IndexOutput skipBuffer)
                      throws IOException
Description copied from class: MultiLevelSkipListWriter
Subclasses must implement the actual skip data encoding in this method.

Specified by:
writeSkipData in class MultiLevelSkipListWriter
Parameters:
level - the level skip data shall be writing for
skipBuffer - the skip buffer to write to
Throws:
IOException


Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.