Package org.elasticsearch.index.store
Class FsDirectoryFactory
java.lang.Object
org.elasticsearch.index.store.FsDirectoryFactory
- All Implemented Interfaces:
IndexStorePlugin.DirectoryFactory
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isHybridFs(org.apache.lucene.store.Directory directory)
Returns true iff the directory is a hybrid fs directoryorg.apache.lucene.store.Directory
newDirectory(IndexSettings indexSettings, ShardPath path)
Creates a new directory per shard.protected org.apache.lucene.store.Directory
newFSDirectory(Path 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, Set<String> preLoadExtensions)
-
Field Details
-
INDEX_LOCK_FACTOR_SETTING
-
-
Constructor Details
-
FsDirectoryFactory
public FsDirectoryFactory()
-
-
Method Details
-
newDirectory
public org.apache.lucene.store.Directory newDirectory(IndexSettings indexSettings, ShardPath path) throws IOExceptionDescription 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 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 org.apache.lucene.store.Directory newFSDirectory(Path location, org.apache.lucene.store.LockFactory lockFactory, IndexSettings indexSettings) throws IOException- Throws:
IOException
-
setPreload
public static org.apache.lucene.store.MMapDirectory setPreload(org.apache.lucene.store.MMapDirectory mMapDirectory, org.apache.lucene.store.LockFactory lockFactory, Set<String> preLoadExtensions) throws IOException- Throws:
IOException
-
isHybridFs
public static boolean isHybridFs(org.apache.lucene.store.Directory directory)Returns true iff the directory is a hybrid fs directory
-