|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.search.backend.impl.lucene.AbstractWorkspaceImpl
public abstract class AbstractWorkspaceImpl
Lucene workspace for an IndexManager
| Field Summary | |
|---|---|
protected org.hibernate.search.backend.impl.lucene.IndexWriterHolder |
writerHolder
|
| Constructor Summary | |
|---|---|
AbstractWorkspaceImpl(DirectoryBasedIndexManager indexManager,
ErrorHandler errorHandler)
|
|
| Method Summary | ||
|---|---|---|
abstract void |
afterTransactionApplied(boolean someFailureHappened,
boolean streaming)
Invoked after all changes of a transaction are applied. |
|
org.apache.lucene.analysis.Analyzer |
getAnalyzer(String name)
|
|
|
getDocumentBuilder(Class<T> entity)
|
|
Set<Class<?>> |
getEntitiesInIndexManager()
|
|
org.apache.lucene.index.IndexWriter |
getIndexWriter()
Gets the IndexWriter, opening one if needed. |
|
org.apache.lucene.index.IndexWriter |
getIndexWriter(ErrorContextBuilder errorContextBuilder)
|
|
void |
incrementModificationCounter(int modCount)
Increment the counter of modification operations done on the index. |
|
void |
optimizerPhase()
If optimization has not been forced give a chance to configured OptimizerStrategy to optimize the index. |
|
void |
performOptimization(org.apache.lucene.index.IndexWriter writer)
Used by OptimizeLuceneWork to start an optimization process of the index. |
|
void |
shutDownNow()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.hibernate.search.store.Workspace |
|---|
flush |
| Field Detail |
|---|
protected final org.hibernate.search.backend.impl.lucene.IndexWriterHolder writerHolder
| Constructor Detail |
|---|
public AbstractWorkspaceImpl(DirectoryBasedIndexManager indexManager,
ErrorHandler errorHandler)
| Method Detail |
|---|
public <T> DocumentBuilderIndexedEntity<?> getDocumentBuilder(Class<T> entity)
getDocumentBuilder in interface Workspacepublic org.apache.lucene.analysis.Analyzer getAnalyzer(String name)
getAnalyzer in interface Workspacepublic void optimizerPhase()
Workspace
optimizerPhase in interface Workspacepublic void performOptimization(org.apache.lucene.index.IndexWriter writer)
Workspace
performOptimization in interface Workspacewriter - the IndexWriter to use for optimizationOptimizeLuceneWork,
SearchFactory.optimize(),
SearchFactory.optimize(Class)public void incrementModificationCounter(int modCount)
Workspace
incrementModificationCounter in interface WorkspacemodCount - the increment to add to the counter.public Set<Class<?>> getEntitiesInIndexManager()
getEntitiesInIndexManager in interface Workspace
public abstract void afterTransactionApplied(boolean someFailureHappened,
boolean streaming)
WorkspaceWorkspace.getIndexWriter() in a finally block
as implementations might rely on counters to release the IndexWriter.
afterTransactionApplied in interface WorkspacesomeFailureHappened - usually false, set to true if errors
where caught while using the IndexWriterstreaming - if no immediate visibility of the change is required (hint for performance)public void shutDownNow()
public org.apache.lucene.index.IndexWriter getIndexWriter()
Workspace
getIndexWriter in interface Workspacepublic org.apache.lucene.index.IndexWriter getIndexWriter(ErrorContextBuilder errorContextBuilder)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||