org.apache.lucene.store

## Class BaseDirectoryWrapper

- java.lang.Object
- - org.apache.lucene.store.Directory
  - - org.apache.lucene.store.FilterDirectory
    - - org.apache.lucene.store.BaseDirectoryWrapper

- All Implemented Interfaces:
    Closeable, AutoCloseable
  Direct Known Subclasses:
    MockDirectoryWrapper, RawDirectoryWrapper

      public abstract class BaseDirectoryWrapper
      extends FilterDirectory

  Calls check index on close.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `isOpen`

    - ### Fields inherited from class org.apache.lucene.store.FilterDirectory

      `in`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `BaseDirectoryWrapper(Directory delegate)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `boolean` | `getCheckIndexOnClose()`
    `boolean` | `getCrossCheckTermVectorsOnClose()`
    `boolean` | `isOpen()`
    `void` | `setCheckIndexOnClose(boolean value)` Set whether or not checkindex should be run on close
    `void` | `setCrossCheckTermVectorsOnClose(boolean value)`

    - ### Methods inherited from class org.apache.lucene.store.FilterDirectory

      `createOutput, createTempOutput, deleteFile, fileLength, getDelegate, getPendingDeletions, listAll, obtainLock, openInput, rename, sync, syncMetaData, toString, unwrap`

    - ### Methods inherited from class org.apache.lucene.store.Directory

      `copyFrom, ensureOpen, openChecksumInput`

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

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

- - ### Field Detail

    - #### isOpen

          protected volatile boolean isOpen

  - ### Constructor Detail

    - #### BaseDirectoryWrapper

          protected BaseDirectoryWrapper(Directory delegate)

  - ### Method Detail

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Overrides:
        `close` in class `FilterDirectory`
      Throws:
        `IOException`

    - #### isOpen

          public boolean isOpen()

    - #### setCheckIndexOnClose

          public void setCheckIndexOnClose(boolean value)

      Set whether or not checkindex should be run on close

    - #### getCheckIndexOnClose

          public boolean getCheckIndexOnClose()

    - #### setCrossCheckTermVectorsOnClose

          public void setCrossCheckTermVectorsOnClose(boolean value)

    - #### getCrossCheckTermVectorsOnClose

          public boolean getCrossCheckTermVectorsOnClose()

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