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
IndexInput s. |
(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.IOException
private void ensureOpen() throws AlreadyClosedException
AlreadyClosedException
- if this FieldsReader is closedpublic void close() throws java.io.IOException
IndexInput
s.java.io.IOException
private static void readField(DataInput in, StoredFieldVisitor visitor, FieldInfo info, int bits) throws java.io.IOException
java.io.IOException
private static void skipField(DataInput in, int bits) throws java.io.IOException
java.io.IOException
static float readZFloat(DataInput in) throws java.io.IOException
java.io.IOException
static double readZDouble(DataInput in) throws java.io.IOException
java.io.IOException
static long readTLong(DataInput in) throws java.io.IOException
java.io.IOException
CompressingStoredFieldsReader.SerializedDocument document(int docID) throws java.io.IOException
java.io.IOException
public void visitDocument(int docID, StoredFieldVisitor visitor) throws java.io.IOException
StoredFieldsReader
docID
visitDocument
in class StoredFieldsReader
java.io.IOException
public StoredFieldsReader clone()
clone
in class StoredFieldsReader
public StoredFieldsReader getMergeInstance()
StoredFieldsReader
The default implementation returns this
getMergeInstance
in class StoredFieldsReader
int getVersion()
CompressionMode getCompressionMode()
CompressingStoredFieldsIndexReader getIndexReader()
long getMaxPointer()
IndexInput getFieldsStream()
int getChunkSize()
long getNumChunks()
long getNumDirtyChunks()
int getPackedIntsVersion()
public long ramBytesUsed()
Accountable
public java.util.Collection<Accountable> getChildResources()
Accountable
Accountables
public void checkIntegrity() throws java.io.IOException
StoredFieldsReader
Note 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 StoredFieldsReader
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object