public final class CompressingStoredFieldsReader extends StoredFieldsReader
| Modifier and Type | Class and Description |
|---|---|
private class |
CompressingStoredFieldsReader.BlockState
Keeps state about the current block of documents.
|
(package private) static class |
CompressingStoredFieldsReader.SerializedDocument
A serialized document, you need to decode its input in order to get an actual
Document. |
| Modifier and Type | Field and Description |
|---|---|
private int |
chunkSize |
private boolean |
closed |
private CompressionMode |
compressionMode |
private Decompressor |
decompressor |
private FieldInfos |
fieldInfos |
private IndexInput |
fieldsStream |
private CompressingStoredFieldsIndexReader |
indexReader |
private long |
maxPointer |
private boolean |
merging |
private long |
numChunks |
private long |
numDirtyChunks |
private int |
numDocs |
private int |
packedIntsVersion |
private CompressingStoredFieldsReader.BlockState |
state |
private int |
version |
| Modifier | Constructor and Description |
|---|---|
private |
CompressingStoredFieldsReader(CompressingStoredFieldsReader reader,
boolean merging) |
|
CompressingStoredFieldsReader(Directory d,
SegmentInfo si,
java.lang.String segmentSuffix,
FieldInfos fn,
IOContext context,
java.lang.String formatName,
CompressionMode compressionMode)
Sole constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkIntegrity()
Checks consistency of this reader.
|
StoredFieldsReader |
clone() |
void |
close()
Close the underlying
IndexInputs. |
(package private) CompressingStoredFieldsReader.SerializedDocument |
document(int docID) |
private void |
ensureOpen() |
java.util.Collection<Accountable> |
getChildResources()
Returns nested resources of this class.
|
(package private) int |
getChunkSize() |
(package private) CompressionMode |
getCompressionMode() |
(package private) IndexInput |
getFieldsStream() |
(package private) CompressingStoredFieldsIndexReader |
getIndexReader() |
(package private) long |
getMaxPointer() |
StoredFieldsReader |
getMergeInstance()
Returns an instance optimized for merging.
|
(package private) long |
getNumChunks() |
(package private) long |
getNumDirtyChunks() |
(package private) int |
getPackedIntsVersion() |
(package private) int |
getVersion() |
long |
ramBytesUsed()
Return the memory usage of this object in bytes.
|
private static void |
readField(DataInput in,
StoredFieldVisitor visitor,
FieldInfo info,
int bits) |
(package private) static long |
readTLong(DataInput in)
Reads a long in a variable-length format.
|
(package private) static double |
readZDouble(DataInput in)
Reads a double in a variable-length format.
|
(package private) static float |
readZFloat(DataInput in)
Reads a float in a variable-length format.
|
private static void |
skipField(DataInput in,
int bits) |
java.lang.String |
toString() |
void |
visitDocument(int docID,
StoredFieldVisitor visitor)
Visit the stored fields for document
docID |
private final int version
private final FieldInfos fieldInfos
private final CompressingStoredFieldsIndexReader indexReader
private final long maxPointer
private final IndexInput fieldsStream
private final int chunkSize
private final int packedIntsVersion
private final CompressionMode compressionMode
private final Decompressor decompressor
private final int numDocs
private final boolean merging
private final CompressingStoredFieldsReader.BlockState state
private final long numChunks
private final long numDirtyChunks
private boolean closed
private CompressingStoredFieldsReader(CompressingStoredFieldsReader reader, boolean merging)
public CompressingStoredFieldsReader(Directory d, SegmentInfo si, java.lang.String segmentSuffix, FieldInfos fn, IOContext context, java.lang.String formatName, CompressionMode compressionMode) throws java.io.IOException
java.io.IOExceptionprivate void ensureOpen()
throws AlreadyClosedException
AlreadyClosedException - if this FieldsReader is closedpublic void close()
throws java.io.IOException
IndexInputs.java.io.IOExceptionprivate static void readField(DataInput in, StoredFieldVisitor visitor, FieldInfo info, int bits) throws java.io.IOException
java.io.IOExceptionprivate static void skipField(DataInput in, int bits) throws java.io.IOException
java.io.IOExceptionstatic float readZFloat(DataInput in) throws java.io.IOException
java.io.IOExceptionstatic double readZDouble(DataInput in) throws java.io.IOException
java.io.IOExceptionstatic long readTLong(DataInput in) throws java.io.IOException
java.io.IOExceptionCompressingStoredFieldsReader.SerializedDocument document(int docID) throws java.io.IOException
java.io.IOExceptionpublic void visitDocument(int docID,
StoredFieldVisitor visitor)
throws java.io.IOException
StoredFieldsReaderdocIDvisitDocument in class StoredFieldsReaderjava.io.IOExceptionpublic StoredFieldsReader clone()
clone in class StoredFieldsReaderpublic StoredFieldsReader getMergeInstance()
StoredFieldsReader
The default implementation returns this
getMergeInstance in class StoredFieldsReaderint getVersion()
CompressionMode getCompressionMode()
CompressingStoredFieldsIndexReader getIndexReader()
long getMaxPointer()
IndexInput getFieldsStream()
int getChunkSize()
long getNumChunks()
long getNumDirtyChunks()
int getPackedIntsVersion()
public long ramBytesUsed()
Accountablepublic java.util.Collection<Accountable> getChildResources()
AccountableAccountablespublic void checkIntegrity()
throws java.io.IOException
StoredFieldsReaderNote that this may be costly in terms of I/O, e.g. may involve computing a checksum value against large data files.
checkIntegrity in class StoredFieldsReaderjava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Object