public class ExplicitOnlyOptimizerStrategy extends Object implements OptimizerStrategy
SearchIntegrator.optimize()
or
SearchIntegrator.optimize(Class)
Constructor and Description |
---|
ExplicitOnlyOptimizerStrategy() |
Modifier and Type | Method and Description |
---|---|
void |
addOperationWithinTransactionCount(long operations)
To count the amount of operations which where applied to the index.
|
void |
initialize(IndexManager indexManager,
Properties indexProperties)
Initializes the
OptimizerStrategy . |
void |
optimize(Workspace workspace)
Allows the implementation to start an optimization process.
|
boolean |
performOptimization(IndexWriter writer)
Invokes optimize on the IndexWriter; This is invoked when
an optimization has been explicitly requested by the user API
using
SearchIntegrator.optimize() or SearchIntegrator.optimize(Class) ,
or at the start or end of a MassIndexer's work. |
protected String indexName
public boolean performOptimization(IndexWriter writer)
OptimizerStrategy
SearchIntegrator.optimize()
or SearchIntegrator.optimize(Class)
,
or at the start or end of a MassIndexer's work.performOptimization
in interface OptimizerStrategy
writer
- the index writertrue
if optimisation occurred, false
otherwisepublic void addOperationWithinTransactionCount(long operations)
OptimizerStrategy
addOperationWithinTransactionCount
in interface OptimizerStrategy
operations
- operation countpublic void optimize(Workspace workspace)
OptimizerStrategy
optimize
in interface OptimizerStrategy
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
indexManager
- the index manager for which this strategy appliesindexProperties
- the configuration propertiesCopyright © 2006-2017 Red Hat, Inc. All Rights Reserved