public interface Workspace
Modifier and Type | Method and Description |
---|---|
void |
afterTransactionApplied(boolean someFailureHappened,
boolean streaming)
Invoked after all changes of a transaction are applied.
|
boolean |
areSingleTermDeletesSafe()
Return true if it's safe to perform index delete operations using only the identifier term.
|
void |
flush()
Makes sure eventually pending changes are made visible to IndexReaders.
|
org.apache.lucene.analysis.Analyzer |
getAnalyzer(String name) |
<T> DocumentBuilderIndexedEntity<?> |
getDocumentBuilder(Class<T> entity) |
Set<Class<?>> |
getEntitiesInIndexManager() |
org.apache.lucene.index.IndexWriter |
getIndexWriter()
Gets the IndexWriter, opening one if needed.
|
void |
notifyWorkApplied(LuceneWork work)
Some workspaces need this to determine for example the kind of flush operations which are safe
to apply.
|
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.
|
<T> DocumentBuilderIndexedEntity<?> getDocumentBuilder(Class<T> entity)
org.apache.lucene.analysis.Analyzer getAnalyzer(String name)
void optimizerPhase()
void performOptimization(org.apache.lucene.index.IndexWriter writer)
writer
- the IndexWriter to use for optimizationOptimizeLuceneWork
,
SearchFactory.optimize()
,
SearchFactory.optimize(Class)
org.apache.lucene.index.IndexWriter getIndexWriter()
Set<Class<?>> getEntitiesInIndexManager()
void afterTransactionApplied(boolean someFailureHappened, boolean streaming)
getIndexWriter()
in a finally block
as implementations might rely on counters to release the IndexWriter.someFailureHappened
- 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)void flush()
boolean areSingleTermDeletesSafe()
void notifyWorkApplied(LuceneWork work)
work
- the LuceneWork which was just processedCopyright © 2006–2014 Hibernate. All rights reserved.