Package org.apache.solr.core
Class MockDirectoryFactory
- java.lang.Object
-
- org.apache.solr.core.DirectoryFactory
-
- org.apache.solr.core.CachingDirectoryFactory
-
- org.apache.solr.core.EphemeralDirectoryFactory
-
- org.apache.solr.core.MockDirectoryFactory
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.solr.util.plugin.NamedListInitializedPlugin
public class MockDirectoryFactory extends org.apache.solr.core.EphemeralDirectoryFactory
Opens a directory withLuceneTestCase.newDirectory()
-
-
Field Summary
Fields Modifier and Type Field Description static String
SOLR_TESTS_ALLOW_READING_FILES_STILL_OPEN_FOR_WRITE
static String
SOLR_TESTS_USING_MOCK_DIRECTORY_WRAPPER
-
Constructor Summary
Constructors Constructor Description MockDirectoryFactory()
-
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, org.apache.solr.core.DirectoryFactory.DirContext dirContext)
protected org.apache.lucene.store.LockFactory
createLockFactory(String rawLockType)
boolean
isAbsolute(String path)
-
Methods inherited from class org.apache.solr.core.EphemeralDirectoryFactory
cleanupOldIndexDirectories, exists, isPersistent, remove, remove
-
Methods inherited from class org.apache.solr.core.CachingDirectoryFactory
addCloseListener, close, deleteOldIndexDirectory, doneWithDirectory, get, getLivePaths, getPath, incRef, init, normalize, release, remove, remove, removeDirectory, stripTrailingSlash
-
-
-
-
Field Detail
-
SOLR_TESTS_ALLOW_READING_FILES_STILL_OPEN_FOR_WRITE
public static final String SOLR_TESTS_ALLOW_READING_FILES_STILL_OPEN_FOR_WRITE
- See Also:
- Constant Field Values
-
SOLR_TESTS_USING_MOCK_DIRECTORY_WRAPPER
public static final String SOLR_TESTS_USING_MOCK_DIRECTORY_WRAPPER
- See Also:
- Constant Field Values
-
-
Method Detail
-
createLockFactory
protected org.apache.lucene.store.LockFactory createLockFactory(String rawLockType) throws IOException
- Specified by:
createLockFactory
in classorg.apache.solr.core.DirectoryFactory
- Throws:
IOException
-
create
protected org.apache.lucene.store.Directory create(String path, org.apache.lucene.store.LockFactory lockFactory, org.apache.solr.core.DirectoryFactory.DirContext dirContext) throws IOException
- Specified by:
create
in classorg.apache.solr.core.DirectoryFactory
- Throws:
IOException
-
isAbsolute
public boolean isAbsolute(String path)
- Overrides:
isAbsolute
in classorg.apache.solr.core.EphemeralDirectoryFactory
-
-