## org.apache.lucene.store
Class BaseDirectoryWrapper

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

All Implemented Interfaces:
  Closeable

Direct Known Subclasses:
  MockDirectoryWrapper

    public class BaseDirectoryWrapper

extends Directory

Calls check index on close.

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.lucene.store.Directory
`Directory.IndexInputSlicer`

Field Summary
`protected Directory` `delegate` our in directory

Fields inherited from class org.apache.lucene.store.Directory
`isOpen, lockFactory`

Constructor Summary
`BaseDirectoryWrapper(Directory delegate)`

Method Summary
`void` `clearLock(String name)`
`void` `close()`
`void` `copy(Directory to, String src, String dest, IOContext context)`
`IndexOutput` `createOutput(String name, IOContext context)`
`Directory.IndexInputSlicer` `createSlicer(String name, IOContext context)`
`void` `deleteFile(String name)`
`boolean` `fileExists(String name)`
`long` `fileLength(String name)`
`boolean` `getCheckIndexOnClose()`
`boolean` `getCrossCheckTermVectorsOnClose()`
`LockFactory` `getLockFactory()`
`String` `getLockID()`
`boolean` `isOpen()`
`String[]` `listAll()`
`Lock` `makeLock(String name)`
`IndexInput` `openInput(String name, IOContext context)`
`void` `setCheckIndexOnClose(boolean value)` Set whether or not checkindex should be run on close
`void` `setCrossCheckTermVectorsOnClose(boolean value)`
`void` `setLockFactory(LockFactory lockFactory)`
`void` `sync(Collection<String> names)`
`String` `toString()`

Methods inherited from class org.apache.lucene.store.Directory
`ensureOpen`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### delegate

    protected final Directory delegate

  our in directory

Constructor Detail

### BaseDirectoryWrapper

    public BaseDirectoryWrapper(Directory delegate)

Method Detail

### close

    public void close()
               throws IOException

  Specified by:
    `close` in interface `Closeable`
  Specified by:
    `close` in class `Directory`
  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()

### listAll

    public String[] listAll()
                     throws IOException

  Specified by:
    `listAll` in class `Directory`
  Throws:
    `IOException`

### fileExists

    public boolean fileExists(String name)
                       throws IOException

  Specified by:
    `fileExists` in class `Directory`
  Throws:
    `IOException`

### deleteFile

    public void deleteFile(String name)
                    throws IOException

  Specified by:
    `deleteFile` in class `Directory`
  Throws:
    `IOException`

### fileLength

    public long fileLength(String name)
                    throws IOException

  Specified by:
    `fileLength` in class `Directory`
  Throws:
    `IOException`

### createOutput

    public IndexOutput createOutput(String name,
                                    IOContext context)
                             throws IOException

  Specified by:
    `createOutput` in class `Directory`
  Throws:
    `IOException`

### sync

    public void sync(Collection<String> names)
              throws IOException

  Specified by:
    `sync` in class `Directory`
  Throws:
    `IOException`

### openInput

    public IndexInput openInput(String name,
                                IOContext context)
                         throws IOException

  Specified by:
    `openInput` in class `Directory`
  Throws:
    `IOException`

### makeLock

    public Lock makeLock(String name)

  Overrides:
    `makeLock` in class `Directory`

### clearLock

    public void clearLock(String name)
                   throws IOException

  Overrides:
    `clearLock` in class `Directory`
  Throws:
    `IOException`

### setLockFactory

    public void setLockFactory(LockFactory lockFactory)
                        throws IOException

  Overrides:
    `setLockFactory` in class `Directory`
  Throws:
    `IOException`

### getLockFactory

    public LockFactory getLockFactory()

  Overrides:
    `getLockFactory` in class `Directory`

### getLockID

    public String getLockID()

  Overrides:
    `getLockID` in class `Directory`

### toString

    public String toString()

  Overrides:
    `toString` in class `Directory`

### copy

    public void copy(Directory to,
                     String src,
                     String dest,
                     IOContext context)
              throws IOException

  Overrides:
    `copy` in class `Directory`
  Throws:
    `IOException`

### createSlicer

    public Directory.IndexInputSlicer createSlicer(String name,
                                                   IOContext context)
                                            throws IOException

  Overrides:
    `createSlicer` in class `Directory`
  Throws:
    `IOException`

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