|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.search.indexes.impl.DirectoryBasedIndexManager
public class DirectoryBasedIndexManager
This implementation of IndexManager is coupled to a DirectoryProvider and a DirectoryBasedReaderProvider
| Constructor Summary | |
|---|---|
DirectoryBasedIndexManager()
|
|
| Method Summary | |
|---|---|
void |
addContainedEntity(Class<?> entity)
|
protected BackendQueueProcessor |
createBackend(String indexName,
Properties cfg,
WorkerBuildContext buildContext)
|
protected DirectoryProvider |
createDirectoryProvider(String indexName,
Properties cfg,
WorkerBuildContext buildContext)
|
protected DirectoryBasedReaderProvider |
createIndexReader(String indexName,
Properties cfg,
WorkerBuildContext buildContext)
|
void |
destroy()
Called when a SearchFactory is stopped. |
org.apache.lucene.analysis.Analyzer |
getAnalyzer(String name)
|
BackendQueueProcessor |
getBackendQueueProcessor()
|
Set<Class<?>> |
getContainedTypes()
|
Lock |
getDirectoryModificationLock()
|
DirectoryProvider |
getDirectoryProvider()
|
EntityIndexBinding |
getIndexBinding(Class<?> entityType)
|
LuceneIndexingParameters |
getIndexingParameters()
|
String |
getIndexName()
Useful for labeling and logging resources from this instance. |
OptimizerStrategy |
getOptimizerStrategy()
|
ReaderProvider |
getReaderProvider()
Provide access to IndexReaders. |
LuceneWorkSerializer |
getSerializer()
|
org.apache.lucene.search.Similarity |
getSimilarity()
|
void |
initialize(String indexName,
Properties properties,
org.apache.lucene.search.Similarity similarity,
WorkerBuildContext buildContext)
Initialize this IndexManager before its use. |
void |
optimize()
To optimize the underlying index. |
void |
performOperations(List<LuceneWork> workList,
IndexingMonitor monitor)
Used to apply update operations to the index. |
void |
performStreamOperation(LuceneWork singleOperation,
IndexingMonitor monitor,
boolean forceAsync)
Perform a single non-transactional operation, best to stream large amounts of operations. |
void |
setSearchFactory(SearchFactoryImplementor boundSearchFactory)
Connects this IndexManager to a new SearchFactory. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DirectoryBasedIndexManager()
| Method Detail |
|---|
public String getIndexName()
IndexManager
getIndexName in interface IndexManagerpublic ReaderProvider getReaderProvider()
IndexManagerIndexReaders.
getReaderProvider in interface IndexManagerReaderProvider instance for the index managed by this instancepublic void destroy()
IndexManagerSearchFactory is stopped. This method typically releases resources.
destroy in interface IndexManager
public void initialize(String indexName,
Properties properties,
org.apache.lucene.search.Similarity similarity,
WorkerBuildContext buildContext)
IndexManagerIndexManager before its use.
initialize in interface IndexManagerindexName - the unique name of the index (manager). Can be used to retrieve a IndexManager instance
via the search factory and IndexManagerHolder.properties - the configuration propertiesbuildContext - context information needed to initialize this index managerpublic Set<Class<?>> getContainedTypes()
getContainedTypes in interface IndexManagerpublic org.apache.lucene.search.Similarity getSimilarity()
getSimilarity in interface IndexManagerSimilarity applied to this index. Note, only a single Similarity can be applied to
a given index.
public void performStreamOperation(LuceneWork singleOperation,
IndexingMonitor monitor,
boolean forceAsync)
IndexManager
performStreamOperation in interface IndexManagersingleOperation - the operation to performmonitor - no be notified of indexing eventsforceAsync - if true, the invocation will not block to wait for it being applied.
When false this will depend on the backend configuration.
public void performOperations(List<LuceneWork> workList,
IndexingMonitor monitor)
IndexManager
performOperations in interface IndexManagerworkList - the list of write operations to apply.monitor - no be notified of indexing eventspublic String toString()
toString in class Objectpublic org.apache.lucene.analysis.Analyzer getAnalyzer(String name)
getAnalyzer in interface IndexManagername - the name of the analyzer to retrieve.
Analyzer with the given name (see also AnalyzerDef)public void setSearchFactory(SearchFactoryImplementor boundSearchFactory)
IndexManagerIndexManager to a new SearchFactory.
setSearchFactory in interface IndexManagerboundSearchFactory - the existing search factory to which to associate this index manager withpublic void addContainedEntity(Class<?> entity)
addContainedEntity in interface IndexManagerentity - Adds the specified entity type to this index manager, making it responsible for manging this type.public void optimize()
IndexManager
optimize in interface IndexManagerpublic LuceneWorkSerializer getSerializer()
getSerializer in interface IndexManagerpublic BackendQueueProcessor getBackendQueueProcessor()
public EntityIndexBinding getIndexBinding(Class<?> entityType)
public Lock getDirectoryModificationLock()
public DirectoryProvider getDirectoryProvider()
public OptimizerStrategy getOptimizerStrategy()
public LuceneIndexingParameters getIndexingParameters()
protected BackendQueueProcessor createBackend(String indexName,
Properties cfg,
WorkerBuildContext buildContext)
protected DirectoryBasedReaderProvider createIndexReader(String indexName,
Properties cfg,
WorkerBuildContext buildContext)
protected DirectoryProvider createDirectoryProvider(String indexName,
Properties cfg,
WorkerBuildContext buildContext)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||