|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hibernate.search.store.optimization.impl.ExplicitOnlyOptimizerStrategy
org.hibernate.search.store.optimization.impl.IncrementalOptimizerStrategy
public class IncrementalOptimizerStrategy
Optimization strategy triggered after a certain amount of operations
Field Summary |
---|
Fields inherited from class org.hibernate.search.store.optimization.impl.ExplicitOnlyOptimizerStrategy |
---|
indexName |
Constructor Summary | |
---|---|
IncrementalOptimizerStrategy()
|
Method Summary | |
---|---|
void |
addOperationWithinTransactionCount(long operations)
To count the amount of operations which where applied to the index. |
long |
getOptimizationsPerformed()
|
void |
initialize(IndexManager indexManager,
Properties indexProperties)
Initializes the OptimizerStrategy . |
void |
optimize(Workspace workspace)
Allows the implementation to start an optimization process. |
boolean |
performOptimization(org.apache.lucene.index.IndexWriter writer)
Invokes optimize on the IndexWriter; This is invoked when an optimization has been explicitly requested by the user API using SearchFactory.optimize() or SearchFactory.optimize(Class) ,
or at the start or end of a MassIndexer's work. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IncrementalOptimizerStrategy()
Method Detail |
---|
public boolean performOptimization(org.apache.lucene.index.IndexWriter writer)
OptimizerStrategy
SearchFactory.optimize()
or SearchFactory.optimize(Class)
,
or at the start or end of a MassIndexer's work.
performOptimization
in interface OptimizerStrategy
performOptimization
in class ExplicitOnlyOptimizerStrategy
writer
- the index writer
true
if optimisation occurred, false
otherwisepublic void addOperationWithinTransactionCount(long operations)
OptimizerStrategy
addOperationWithinTransactionCount
in interface OptimizerStrategy
addOperationWithinTransactionCount
in class ExplicitOnlyOptimizerStrategy
operations
- operation countpublic void optimize(Workspace workspace)
OptimizerStrategy
optimize
in interface OptimizerStrategy
optimize
in class ExplicitOnlyOptimizerStrategy
workspace
- the current work spacepublic void initialize(IndexManager indexManager, Properties indexProperties)
OptimizerStrategy
OptimizerStrategy
. Is called once at the initialisation of the strategy.
initialize
in interface OptimizerStrategy
initialize
in class ExplicitOnlyOptimizerStrategy
indexManager
- the index manager for which this strategy appliesindexProperties
- the configuration propertiespublic long getOptimizationsPerformed()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |