Package org.elasticsearch.index.store
Class FsDirectoryFactory
- java.lang.Object
-
- org.elasticsearch.index.store.FsDirectoryFactory
-
- All Implemented Interfaces:
IndexStorePlugin.DirectoryFactory
public class FsDirectoryFactory extends java.lang.Object implements IndexStorePlugin.DirectoryFactory
-
-
Field Summary
Fields Modifier and Type Field Description static Setting<org.apache.lucene.store.LockFactory>INDEX_LOCK_FACTOR_SETTING
-
Constructor Summary
Constructors Constructor Description FsDirectoryFactory()
-
Method Summary
Modifier and Type Method Description static booleanisHybridFs(org.apache.lucene.store.Directory directory)Returns true iff the directory is a hybrid fs directoryorg.apache.lucene.store.DirectorynewDirectory(IndexSettings indexSettings, ShardPath path)Creates a new directory per shard.protected org.apache.lucene.store.DirectorynewFSDirectory(java.nio.file.Path location, org.apache.lucene.store.LockFactory lockFactory, IndexSettings indexSettings)static org.apache.lucene.store.MMapDirectorysetPreload(org.apache.lucene.store.MMapDirectory mMapDirectory, org.apache.lucene.store.LockFactory lockFactory, java.util.Set<java.lang.String> preLoadExtensions)
-
-
-
Field Detail
-
INDEX_LOCK_FACTOR_SETTING
public static final Setting<org.apache.lucene.store.LockFactory> INDEX_LOCK_FACTOR_SETTING
-
-
Method Detail
-
newDirectory
public org.apache.lucene.store.Directory newDirectory(IndexSettings indexSettings, ShardPath path) throws java.io.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:
java.io.IOException- if an IOException occurs while opening the directory
-
newFSDirectory
protected org.apache.lucene.store.Directory newFSDirectory(java.nio.file.Path location, org.apache.lucene.store.LockFactory lockFactory, IndexSettings indexSettings) throws java.io.IOException- Throws:
java.io.IOException
-
setPreload
public static org.apache.lucene.store.MMapDirectory setPreload(org.apache.lucene.store.MMapDirectory mMapDirectory, org.apache.lucene.store.LockFactory lockFactory, java.util.Set<java.lang.String> preLoadExtensions) throws java.io.IOException- Throws:
java.io.IOException
-
isHybridFs
public static boolean isHybridFs(org.apache.lucene.store.Directory directory)
Returns true iff the directory is a hybrid fs directory
-
-