org.apache.lucene.index

## Class AssertingDirectoryReader

- java.lang.Object
- - org.apache.lucene.index.IndexReader
  - - org.apache.lucene.index.CompositeReader
    - - org.apache.lucene.index.BaseCompositeReader<AtomicReader>
      - - org.apache.lucene.index.DirectoryReader
        - - org.apache.lucene.index.AssertingDirectoryReader

- All Implemented Interfaces:
    Closeable, AutoCloseable

      public class AssertingDirectoryReader
      extends DirectoryReader

  A `DirectoryReader` that wraps all its subreaders with `AssertingAtomicReader`

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.lucene.index.IndexReader

      `IndexReader.ReaderClosedListener`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected DirectoryReader` | `in`

    - ### Fields inherited from class org.apache.lucene.index.DirectoryReader

      `DEFAULT_TERMS_INDEX_DIVISOR, directory`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AssertingDirectoryReader(DirectoryReader in)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `doClose()`
    `protected DirectoryReader` | `doOpenIfChanged()`
    `protected DirectoryReader` | `doOpenIfChanged(IndexCommit commit)`
    `protected DirectoryReader` | `doOpenIfChanged(IndexWriter writer, boolean applyAllDeletes)`
    `Object` | `getCombinedCoreAndDeletesKey()`
    `Object` | `getCoreCacheKey()`
    `IndexCommit` | `getIndexCommit()`
    `long` | `getVersion()`
    `boolean` | `isCurrent()`

    - ### Methods inherited from class org.apache.lucene.index.DirectoryReader

      `directory, indexExists, listCommits, open, open, open, open, open, openIfChanged, openIfChanged, openIfChanged`

    - ### Methods inherited from class org.apache.lucene.index.BaseCompositeReader

      `docFreq, document, getSequentialSubReaders, getTermVectors, hasDeletions, maxDoc, numDocs, readerBase, readerIndex, totalTermFreq`

    - ### Methods inherited from class org.apache.lucene.index.CompositeReader

      `getContext, toString`

    - ### Methods inherited from class org.apache.lucene.index.IndexReader

      `addReaderClosedListener, close, decRef, document, document, ensureOpen, equals, getRefCount, getTermVector, hashCode, incRef, leaves, numDeletedDocs, registerParentReader, removeReaderClosedListener, tryIncRef`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### in

          protected DirectoryReader in

  - ### Constructor Detail

    - #### AssertingDirectoryReader

          public AssertingDirectoryReader(DirectoryReader in)

  - ### Method Detail

    - #### doOpenIfChanged

          protected DirectoryReader doOpenIfChanged()
                                             throws IOException

      Specified by:
        `doOpenIfChanged` in class `DirectoryReader`
      Throws:
        `IOException`

    - #### doOpenIfChanged

          protected DirectoryReader doOpenIfChanged(IndexCommit commit)
                                             throws IOException

      Specified by:
        `doOpenIfChanged` in class `DirectoryReader`
      Throws:
        `IOException`

    - #### doOpenIfChanged

          protected DirectoryReader doOpenIfChanged(IndexWriter writer,
                                        boolean applyAllDeletes)
                                             throws IOException

      Specified by:
        `doOpenIfChanged` in class `DirectoryReader`
      Throws:
        `IOException`

    - #### getVersion

          public long getVersion()

      Specified by:
        `getVersion` in class `DirectoryReader`

    - #### isCurrent

          public boolean isCurrent()
                            throws IOException

      Specified by:
        `isCurrent` in class `DirectoryReader`
      Throws:
        `IOException`

    - #### getIndexCommit

          public IndexCommit getIndexCommit()
                                     throws IOException

      Specified by:
        `getIndexCommit` in class `DirectoryReader`
      Throws:
        `IOException`

    - #### doClose

          protected void doClose()
                          throws IOException

      Specified by:
        `doClose` in class `IndexReader`
      Throws:
        `IOException`

    - #### getCoreCacheKey

          public Object getCoreCacheKey()

      Overrides:
        `getCoreCacheKey` in class `IndexReader`

    - #### getCombinedCoreAndDeletesKey

          public Object getCombinedCoreAndDeletesKey()

      Overrides:
        `getCombinedCoreAndDeletesKey` in class `IndexReader`

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