|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.modeshape.search.lucene.LuceneConfigurations.PoolingDirectoryFactory<DirectoryType>
DirectoryType
- the concrete type of the directory@ThreadSafe protected abstract static class LuceneConfigurations.PoolingDirectoryFactory<DirectoryType extends org.apache.lucene.store.Directory>
A LuceneConfiguration
implementation that creates Directory
instances of the supplied type for each
workspace and pools the results, ensuring that the same Directory
instance is always returned for the same
workspace name.
Constructor Summary | |
---|---|
protected |
LuceneConfigurations.PoolingDirectoryFactory()
|
Method Summary | |
---|---|
protected abstract DirectoryType |
createDirectory(String workspaceName,
String indexName)
Method implemented by subclasses to create a new Directory implementation. |
boolean |
destroyDirectory(String workspaceName,
String indexName)
Destroy the Directory that is used for the workspace with the supplied name. |
protected abstract boolean |
doDestroy(DirectoryType directory)
|
org.apache.lucene.store.Directory |
getDirectory(String workspaceName,
String indexName)
Get the Directory that should be used for the workspace with the supplied name. |
boolean |
hasExistingIndex(String workspaceName,
String indexName)
Return whether the index with the given name already exists for the given workspace name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.modeshape.search.lucene.LuceneConfiguration |
---|
getVersion |
Constructor Detail |
---|
protected LuceneConfigurations.PoolingDirectoryFactory()
Method Detail |
---|
public org.apache.lucene.store.Directory getDirectory(String workspaceName, String indexName) throws SearchEngineException
Directory
that should be used for the workspace with the supplied name.
getDirectory
in interface LuceneConfiguration
workspaceName
- the workspace nameindexName
- the name of the index to be created
SearchEngineException
- if there is a problem creating the directoryLuceneConfiguration.getDirectory(java.lang.String, java.lang.String)
public boolean destroyDirectory(String workspaceName, String indexName) throws SearchEngineException
Directory
that is used for the workspace with the supplied name.
destroyDirectory
in interface LuceneConfiguration
workspaceName
- the workspace nameindexName
- the name of the index to be created
SearchEngineException
- if there is a problem creating the directoryLuceneConfiguration.destroyDirectory(java.lang.String, java.lang.String)
protected abstract DirectoryType createDirectory(String workspaceName, String indexName) throws SearchEngineException
workspaceName
- the name of the workspace for which the Directory
is to be created; never nullindexName
- the name of the index to be created
SearchEngineException
- if there is a problem creating the directoryprotected abstract boolean doDestroy(DirectoryType directory) throws SearchEngineException
SearchEngineException
public boolean hasExistingIndex(String workspaceName, String indexName) throws SearchEngineException
LuceneConfiguration
hasExistingIndex
in interface LuceneConfiguration
workspaceName
- the workspace nameindexName
- the name of the index to be created
SearchEngineException
- if there is a problem creating the directory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |