Package org.apache.solr.core
Class MMapDirectoryFactory
- java.lang.Object
-
- org.apache.solr.core.DirectoryFactory
-
- org.apache.solr.core.CachingDirectoryFactory
-
- org.apache.solr.core.StandardDirectoryFactory
-
- org.apache.solr.core.MMapDirectoryFactory
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,NamedListInitializedPlugin
public class MMapDirectoryFactory extends StandardDirectoryFactory
Directly provide MMapDirectory instead of relying onFSDirectory.open(java.nio.file.Path)
.Can set the following parameters:
- unmap -- See
MMapDirectory.setUseUnmap(boolean)
- preload -- See
MMapDirectory.setPreload(boolean)
- maxChunkSize -- The Max chunk size. See
MMapDirectory(Path, LockFactory, long)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.solr.core.CachingDirectoryFactory
CachingDirectoryFactory.CacheValue, CachingDirectoryFactory.CloseListener
-
Nested classes/interfaces inherited from class org.apache.solr.core.DirectoryFactory
DirectoryFactory.DirContext
-
-
Field Summary
-
Fields inherited from class org.apache.solr.core.CachingDirectoryFactory
byDirectoryCache, byPathCache, closeListeners, removeEntries
-
Fields inherited from class org.apache.solr.core.DirectoryFactory
coreContainer, dataHomePath, INDEX_W_TIMESTAMP_REGEX, IOCONTEXT_NO_CACHE, LOCK_TYPE_NATIVE, LOCK_TYPE_NONE, LOCK_TYPE_SIMPLE, LOCK_TYPE_SINGLE
-
-
Constructor Summary
Constructors Constructor Description MMapDirectoryFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.lucene.store.Directory
create(String path, org.apache.lucene.store.LockFactory lockFactory, DirectoryFactory.DirContext dirContext)
Creates a new Directory for a given path.void
init(org.apache.solr.common.util.NamedList<?> args)
init
will be called just once, immediately after creation.-
Methods inherited from class org.apache.solr.core.StandardDirectoryFactory
createLockFactory, isPersistent, move, normalize, removeDirectory, renameWithOverwrite
-
Methods inherited from class org.apache.solr.core.CachingDirectoryFactory
addCloseListener, close, deleteOldIndexDirectory, doneWithDirectory, exists, get, getLivePaths, getPath, incRef, release, remove, remove, remove, remove, stripTrailingSlash
-
Methods inherited from class org.apache.solr.core.DirectoryFactory
cleanupOldIndexDirectories, empty, getBaseDir, getDataHome, initCoreContainer, isAbsolute, isSharedStorage, newDefaultUpdateLog, searchersReserveCommitPoints, size, size, sizeOf, sizeOfDirectory
-
-
-
-
Method Detail
-
init
public void init(org.apache.solr.common.util.NamedList<?> args)
Description copied from interface:NamedListInitializedPlugin
init
will be called just once, immediately after creation.Source of the initialization arguments will typically be solrconfig.xml, but will ultimately depends on the plugin itself
- Specified by:
init
in interfaceNamedListInitializedPlugin
- Overrides:
init
in classCachingDirectoryFactory
- Parameters:
args
- non-null list of initialization parameters (may be empty)
-
create
protected org.apache.lucene.store.Directory create(String path, org.apache.lucene.store.LockFactory lockFactory, DirectoryFactory.DirContext dirContext) throws IOException
Description copied from class:DirectoryFactory
Creates a new Directory for a given path.- Overrides:
create
in classStandardDirectoryFactory
- Throws:
IOException
- If there is a low-level I/O error.
-
-