org.apache.lucene.index
Class PerDocWriteState

java.lang.Object
  extended by org.apache.lucene.index.PerDocWriteState

public class PerDocWriteState
extends Object

Encapsulates all necessary state to initiate a PerDocConsumer and create all necessary files in order to consume and merge per-document values.

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

Field Summary
 Counter bytesUsed
          Number of bytes allocated in RAM to hold this state.
 IOContext context
          IOContext to use for all file writing.
 Directory directory
          Directory to write all files to.
 InfoStream infoStream
          InfoStream used for debugging.
 SegmentInfo segmentInfo
          SegmentInfo describing this segment.
 String segmentSuffix
          Segment suffix to pass to IndexFileNames.segmentFileName(String,String,String).
 
Constructor Summary
PerDocWriteState(InfoStream infoStream, Directory directory, SegmentInfo segmentInfo, Counter bytesUsed, String segmentSuffix, IOContext context)
          Creates a PerDocWriteState.
PerDocWriteState(PerDocWriteState state, String segmentSuffix)
          Creates a PerDocWriteState, copying fields from another (copy constructor) but setting a new segmentSuffix.
PerDocWriteState(SegmentWriteState state)
          Creates a PerDocWriteState, copying fields from another and allocating a new bytesUsed.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

infoStream

public final InfoStream infoStream
InfoStream used for debugging.


directory

public final Directory directory
Directory to write all files to.


segmentInfo

public final SegmentInfo segmentInfo
SegmentInfo describing this segment.


bytesUsed

public final Counter bytesUsed
Number of bytes allocated in RAM to hold this state.


segmentSuffix

public final String segmentSuffix
Segment suffix to pass to IndexFileNames.segmentFileName(String,String,String).


context

public final IOContext context
IOContext to use for all file writing.

Constructor Detail

PerDocWriteState

public PerDocWriteState(InfoStream infoStream,
                        Directory directory,
                        SegmentInfo segmentInfo,
                        Counter bytesUsed,
                        String segmentSuffix,
                        IOContext context)
Creates a PerDocWriteState.


PerDocWriteState

public PerDocWriteState(SegmentWriteState state)
Creates a PerDocWriteState, copying fields from another and allocating a new bytesUsed.


PerDocWriteState

public PerDocWriteState(PerDocWriteState state,
                        String segmentSuffix)
Creates a PerDocWriteState, copying fields from another (copy constructor) but setting a new segmentSuffix.



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