java.lang.Object
org.elasticsearch.index.store.FsDirectoryFactory
- All Implemented Interfaces:
IndexStorePlugin.DirectoryFactory
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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(Path location, org.apache.lucene.store.LockFactory lockFactory, IndexSettings indexSettings) org.apache.lucene.store.MMapDirectorysetPreload(org.apache.lucene.store.MMapDirectory mMapDirectory, Set<String> preLoadExtensions) Sets the preload, if any, on the given directory based on the extensions.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.plugins.IndexStorePlugin.DirectoryFactory
newDirectory
-
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 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 org.apache.lucene.store.Directory newFSDirectory(Path location, org.apache.lucene.store.LockFactory lockFactory, IndexSettings indexSettings) throws IOException - Throws:
IOException
-
setPreload
public org.apache.lucene.store.MMapDirectory setPreload(org.apache.lucene.store.MMapDirectory mMapDirectory, Set<String> preLoadExtensions) Sets the preload, if any, on the given directory based on the extensions. Returns the same directory instance. -
isHybridFs
public static boolean isHybridFs(org.apache.lucene.store.Directory directory) Returns true iff the directory is a hybrid fs directory
-