Package org.apache.lucene.codecs
Class StoredFieldsReader
java.lang.Object
org.apache.lucene.codecs.StoredFieldsReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Cloneable,Accountable
- Direct Known Subclasses:
CompressingStoredFieldsReader,SimpleTextStoredFieldsReader
public abstract class StoredFieldsReader
extends Object
implements Cloneable, Closeable, Accountable
Codec API for reading stored fields.
You need to implement visitDocument(int, StoredFieldVisitor) to
read the stored fields for a document, implement clone() (creating
clones of any IndexInputs used, etc), and Closeable.close()
-
Field Summary
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidChecks consistency of this reader.abstract StoredFieldsReaderclone()Returns an instance optimized for merging.abstract voidvisitDocument(int docID, StoredFieldVisitor visitor) Visit the stored fields for documentdocIDMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.lucene.util.Accountable
getChildResources, ramBytesUsed
-
Constructor Details
-
StoredFieldsReader
protected StoredFieldsReader()Sole constructor. (For invocation by subclass constructors, typically implicit.)
-
-
Method Details
-
visitDocument
Visit the stored fields for documentdocID- Throws:
IOException
-
clone
-
checkIntegrity
Checks 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.
- Throws:
IOException
-
getMergeInstance
Returns an instance optimized for merging. This instance may not be cloned.The default implementation returns
this
-