org.apache.lucene.codecs.compressing

## 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

  `StoredFieldsReader` impl for `CompressingStoredFieldsFormat`.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompressingStoredFieldsReader(Directory d, SegmentInfo si, String segmentSuffix, FieldInfos fn, IOContext context, String formatName, CompressionMode compressionMode)` Sole constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `checkIntegrity()` Checks consistency of this reader.
    `StoredFieldsReader` | `clone()`
    `void` | `close()` Close the underlying `IndexInput`s.
    `Collection<Accountable>` | `getChildResources()` Returns nested resources of this class.
    `StoredFieldsReader` | `getMergeInstance()` Returns an instance optimized for merging.
    `long` | `ramBytesUsed()` Return the memory usage of this object in bytes.
    `String` | `toString()`
    `void` | `visitDocument(int docID, StoredFieldVisitor visitor)` Visit the stored fields for document `docID`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 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 IOException

      Close the underlying `IndexInput`s.
      Throws:
        `IOException`

    - #### visitDocument

          public void visitDocument(int docID,
                           StoredFieldVisitor visitor)
                             throws IOException

      Description copied from class: `StoredFieldsReader`
      Visit the stored fields for document `docID`
      Specified by:
        `visitDocument` in class `StoredFieldsReader`
      Throws:
        `IOException`

    - #### clone

          public StoredFieldsReader clone()

      Specified by:
        `clone` in class `StoredFieldsReader`

    - #### getMergeInstance

          public StoredFieldsReader getMergeInstance()

      Description copied from class: `StoredFieldsReader`
      Returns an instance optimized for merging.

      The default implementation returns `this`

      Overrides:
        `getMergeInstance` in class `StoredFieldsReader`

    - #### ramBytesUsed

          public long ramBytesUsed()

      Description copied from interface: `Accountable`
      Return the memory usage of this object in bytes. Negative values are illegal.

    - #### getChildResources

          public Collection<Accountable> getChildResources()

      Description copied from interface: `Accountable`
      Returns 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 IOException

      Description copied from class: `StoredFieldsReader`
      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.

      Specified by:
        `checkIntegrity` in class `StoredFieldsReader`
      Throws:
        `IOException`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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