Class FsDirectoryFactory

org.elasticsearch.index.store.FsDirectoryFactory
All Implemented Interfaces:
IndexStorePlugin.DirectoryFactory

public class FsDirectoryFactory extends implements IndexStorePlugin.DirectoryFactory
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static Setting<org.apache.lucene.store.LockFactory>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    isHybridFs​(org.apache.lucene.store.Directory directory)
    Returns true iff the directory is a hybrid fs directory
    org.apache.lucene.store.Directory
    newDirectory​(IndexSettings indexSettings, ShardPath path)
    Creates a new directory per shard.
    protected org.apache.lucene.store.Directory
     location, org.apache.lucene.store.LockFactory lockFactory, IndexSettings indexSettings)
     
    static org.apache.lucene.store.MMapDirectory
    setPreload​(org.apache.lucene.store.MMapDirectory mMapDirectory, org.apache.lucene.store.LockFactory lockFactory, <> preLoadExtensions)
     

    Methods inherited from class java.lang.

    , , , , , , , , , ,
  • Field Details

    • INDEX_LOCK_FACTOR_SETTING

      public static final Setting<org.apache.lucene.store.LockFactory> INDEX_LOCK_FACTOR_SETTING
  • Constructor Details

    • FsDirectoryFactory

      public FsDirectoryFactory()
  • Method Details

    • newDirectory

      public org.apache.lucene.store.Directory newDirectory(IndexSettings indexSettings, ShardPath path) throws
      Description copied from interface: IndexStorePlugin.DirectoryFactory
      Creates a new directory per shard. This method is called once per shard on shard creation.
      Specified by:
      newDirectory in interface IndexStorePlugin.DirectoryFactory
      Parameters:
      indexSettings - the shards index settings
      path - the path the shard is using
      Returns:
      a new lucene directory instance
      Throws:
      - if an IOException occurs while opening the directory
    • newFSDirectory

      protected org.apache.lucene.store.Directory newFSDirectory( location, org.apache.lucene.store.LockFactory lockFactory, IndexSettings indexSettings) throws
      Throws:
    • setPreload

      public static org.apache.lucene.store.MMapDirectory setPreload(org.apache.lucene.store.MMapDirectory mMapDirectory, org.apache.lucene.store.LockFactory lockFactory, <> preLoadExtensions) throws
      Throws:
    • isHybridFs

      public static boolean isHybridFs(org.apache.lucene.store.Directory directory)
      Returns true iff the directory is a hybrid fs directory