Class CompressingStoredFieldsReader
- java.lang.Object
-
- org.apache.lucene.codecs.StoredFieldsReader
-
- org.apache.lucene.codecs.compressing.CompressingStoredFieldsReader
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Cloneable,Accountable
public final class CompressingStoredFieldsReader extends StoredFieldsReader
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Constructor Summary
Constructors Constructor Description CompressingStoredFieldsReader(Directory d, SegmentInfo si, String segmentSuffix, FieldInfos fn, IOContext context, String formatName, CompressionMode compressionMode)Sole constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckIntegrity()Checks consistency of this reader.StoredFieldsReaderclone()voidclose()Close the underlyingIndexInputs.Collection<Accountable>getChildResources()Returns nested resources of this class.StoredFieldsReadergetMergeInstance()Returns an instance optimized for merging.longramBytesUsed()Return the memory usage of this object in bytes.StringtoString()voidvisitDocument(int docID, StoredFieldVisitor visitor)Visit the stored fields for documentdocID
-
-
-
Constructor Detail
-
CompressingStoredFieldsReader
public CompressingStoredFieldsReader(Directory d, SegmentInfo si, String segmentSuffix, FieldInfos fn, IOContext context, String formatName, CompressionMode compressionMode) throws IOException
Sole constructor.- Throws:
IOException
-
-
Method Detail
-
close
public void close() throws IOExceptionClose the underlyingIndexInputs.- Throws:
IOException
-
visitDocument
public void visitDocument(int docID, StoredFieldVisitor visitor) throws IOExceptionDescription copied from class:StoredFieldsReaderVisit the stored fields for documentdocID- Specified by:
visitDocumentin classStoredFieldsReader- Throws:
IOException
-
clone
public StoredFieldsReader clone()
- Specified by:
clonein classStoredFieldsReader
-
getMergeInstance
public StoredFieldsReader getMergeInstance()
Description copied from class:StoredFieldsReaderReturns an instance optimized for merging. This instance may not be cloned.The default implementation returns
this- Overrides:
getMergeInstancein classStoredFieldsReader
-
ramBytesUsed
public long ramBytesUsed()
Description copied from interface:AccountableReturn the memory usage of this object in bytes. Negative values are illegal.
-
getChildResources
public Collection<Accountable> getChildResources()
Description copied from interface:AccountableReturns nested resources of this class. The result should be a point-in-time snapshot (to avoid race conditions).- See Also:
Accountables
-
checkIntegrity
public void checkIntegrity() throws IOExceptionDescription copied from class:StoredFieldsReaderChecks consistency of this reader.Note that this may be costly in terms of I/O, e.g. may involve computing a checksum value against large data files.
- Specified by:
checkIntegrityin classStoredFieldsReader- Throws:
IOException
-
-