org.apache.solr.core

## Class EphemeralDirectoryFactory

- java.lang.Object
- - org.apache.solr.core.DirectoryFactory
  - - org.apache.solr.core.CachingDirectoryFactory
    - - org.apache.solr.core.EphemeralDirectoryFactory

- All Implemented Interfaces:
    Closeable, AutoCloseable, NamedListInitializedPlugin
  Direct Known Subclasses:
    RAMDirectoryFactory

      public abstract class EphemeralDirectoryFactory
      extends CachingDirectoryFactory

  Directory provider for implementations that do not persist over reboots.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.solr.core.CachingDirectoryFactory

      `CachingDirectoryFactory.CacheValue, CachingDirectoryFactory.CloseListener`

    - ### Nested classes/interfaces inherited from class org.apache.solr.core.DirectoryFactory

      `DirectoryFactory.DirContext`

  - ### Field Summary

    - ### Fields inherited from class org.apache.solr.core.CachingDirectoryFactory

      `byDirectoryCache, byPathCache, closeListeners, removeEntries`

    - ### Fields inherited from class org.apache.solr.core.DirectoryFactory

      `coreContainer, INDEX_W_TIMESTAMP_REGEX, IOCONTEXT_NO_CACHE, LOCK_TYPE_HDFS, LOCK_TYPE_NATIVE, LOCK_TYPE_NONE, LOCK_TYPE_SIMPLE, LOCK_TYPE_SINGLE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EphemeralDirectoryFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `exists(String path)` Returns true if a Directory exists for a given path.
    `boolean` | `isAbsolute(String path)`
    `boolean` | `isPersistent()`
    `void` | `remove(Directory dir)` Removes the Directory's persistent storage.
    `void` | `remove(String path)` This remove is special in that it may be called even after the factory has been closed.

    - ### Methods inherited from class org.apache.solr.core.CachingDirectoryFactory

      `addCloseListener, close, deleteOldIndexDirectory, doneWithDirectory, get, getLivePaths, getPath, incRef, init, normalize, release, remove, remove, removeDirectory, stripTrailingSlash`

    - ### Methods inherited from class org.apache.solr.core.DirectoryFactory

      `cleanupOldIndexDirectories, create, createLockFactory, empty, getDataHome, initCoreContainer, isSharedStorage, move, offerMBeans, searchersReserveCommitPoints, size, size, sizeOf, sizeOfDirectory`

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

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

- - ### Constructor Detail

    - #### EphemeralDirectoryFactory

          public EphemeralDirectoryFactory()

  - ### Method Detail

    - #### exists

          public boolean exists(String path)
                         throws IOException

      Description copied from class: `DirectoryFactory`
      Returns true if a Directory exists for a given path.
      Overrides:
        `exists` in class `CachingDirectoryFactory`
      Throws:
        `IOException` - If there is a low-level I/O error.

    - #### isPersistent

          public boolean isPersistent()

      Specified by:
        `isPersistent` in class `DirectoryFactory`
      Returns:
        true if data is kept after close.

    - #### isAbsolute

          public boolean isAbsolute(String path)

      Overrides:
        `isAbsolute` in class `DirectoryFactory`
      Parameters:
        `path` - the path to check
      Returns:
        true if absolute, as in not relative

    - #### remove

          public void remove(Directory dir)
                      throws IOException

      Description copied from class: `DirectoryFactory`
      Removes the Directory's persistent storage. For example: A file system impl may remove the on disk directory.
      Overrides:
        `remove` in class `CachingDirectoryFactory`
      Throws:
        `IOException` - If there is a low-level I/O error.

    - #### remove

          public void remove(String path)
                      throws IOException

      Description copied from class: `DirectoryFactory`
      This remove is special in that it may be called even after the factory has been closed. Remove only makes sense for persistent directory factories.
      Overrides:
        `remove` in class `CachingDirectoryFactory`
      Parameters:
        `path` - to remove
      Throws:
        `IOException` - If there is a low-level I/O error.

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