Package org.elasticsearch.index.store
Class FsDirectoryFactory
- java.lang.Object
-
- org.elasticsearch.index.store.FsDirectoryFactory
-
- All Implemented Interfaces:
IndexStorePlugin.DirectoryFactory
public class FsDirectoryFactory extends Object implements IndexStorePlugin.DirectoryFactory
-
-
Field Summary
Fields Modifier and Type Field Description static Setting<LockFactory>INDEX_LOCK_FACTOR_SETTING
-
Constructor Summary
Constructors Constructor Description FsDirectoryFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanisHybridFs(Directory directory)Returns true iff the directory is a hybrid fs directoryDirectorynewDirectory(IndexSettings indexSettings, ShardPath path)Creates a new directory per shard.protected DirectorynewFSDirectory(Path location, LockFactory lockFactory, IndexSettings indexSettings)static MMapDirectorysetPreload(MMapDirectory mMapDirectory, LockFactory lockFactory, Set<String> preLoadExtensions)
-
-
-
Field Detail
-
INDEX_LOCK_FACTOR_SETTING
public static final Setting<LockFactory> INDEX_LOCK_FACTOR_SETTING
-
-
Method Detail
-
newDirectory
public Directory newDirectory(IndexSettings indexSettings, ShardPath path) throws IOException
Description copied from interface:IndexStorePlugin.DirectoryFactoryCreates a new directory per shard. This method is called once per shard on shard creation.- Specified by:
newDirectoryin interfaceIndexStorePlugin.DirectoryFactory- Parameters:
indexSettings- the shards index settingspath- the path the shard is using- Returns:
- a new lucene directory instance
- Throws:
IOException- if an IOException occurs while opening the directory
-
newFSDirectory
protected Directory newFSDirectory(Path location, LockFactory lockFactory, IndexSettings indexSettings) throws IOException
- Throws:
IOException
-
setPreload
public static MMapDirectory setPreload(MMapDirectory mMapDirectory, LockFactory lockFactory, Set<String> preLoadExtensions) throws IOException
- Throws:
IOException
-
isHybridFs
public static boolean isHybridFs(Directory directory)
Returns true iff the directory is a hybrid fs directory
-
-