org.hibernate.search.store.optimization
Class IncrementalOptimizerStrategy

java.lang.Object
  extended by org.hibernate.search.store.optimization.IncrementalOptimizerStrategy
All Implemented Interfaces:
OptimizerStrategy

public class IncrementalOptimizerStrategy
extends Object
implements OptimizerStrategy

Optimization strategy triggered after a certain amount of operations

Author:
Emmanuel Bernard

Constructor Summary
IncrementalOptimizerStrategy()
           
 
Method Summary
 void addTransaction(long operations)
          has to be called in a thread safe way
 void initialize(DirectoryProvider directoryProvider, Properties indexProperties, SearchFactoryImplementor searchFactoryImplementor)
           
 boolean needOptimization()
          has to be called in a thread safe way
 void optimizationForced()
          has to be called in a thread safe way
 void optimize(Workspace workspace)
          has to be called in a thread safe way
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IncrementalOptimizerStrategy

public IncrementalOptimizerStrategy()
Method Detail

initialize

public void initialize(DirectoryProvider directoryProvider,
                       Properties indexProperties,
                       SearchFactoryImplementor searchFactoryImplementor)
Specified by:
initialize in interface OptimizerStrategy

optimizationForced

public void optimizationForced()
Description copied from interface: OptimizerStrategy
has to be called in a thread safe way

Specified by:
optimizationForced in interface OptimizerStrategy

needOptimization

public boolean needOptimization()
Description copied from interface: OptimizerStrategy
has to be called in a thread safe way

Specified by:
needOptimization in interface OptimizerStrategy

addTransaction

public void addTransaction(long operations)
Description copied from interface: OptimizerStrategy
has to be called in a thread safe way

Specified by:
addTransaction in interface OptimizerStrategy

optimize

public void optimize(Workspace workspace)
Description copied from interface: OptimizerStrategy
has to be called in a thread safe way

Specified by:
optimize in interface OptimizerStrategy