|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compass.core.lucene.engine.optimizer.LuceneSearchEngineOptimizerManager
public class LuceneSearchEngineOptimizerManager
A SearchEngineOptimizer manager that manages the actual
SearchEngineOptimizer.
When configured (configure(org.compass.core.config.CompassSettings), creates the optimizer
that will be used based on the LuceneEnvironment.Optimizer.TYPE. The default
optimizer used is the AdaptiveOptimizer.
When started, will check the LuceneEnvironment.Optimizer.SCHEDULE flag,
and if set to true (the default) will schedule a periodic optimization process. The period
is taken from the LuceneEnvironment.Optimizer.SCHEDULE_PERIOD setting, which
is set in seconds and defaults to 10.
| Constructor Summary | |
|---|---|
LuceneSearchEngineOptimizerManager(LuceneSearchEngineFactory searchEngineFactory)
|
|
| Method Summary | |
|---|---|
void |
configure(CompassSettings settings)
Configure using the given settings. |
void |
forceOptimize()
Optimzies the search engine regardless if it required optimization or not. |
void |
forceOptimize(String subIndex)
Optimzies the sub index regardless if it required optimization or not. |
SearchEngineOptimizer |
getOptimizer()
|
boolean |
isRunning()
Returns true if the optimizer is running. |
void |
optimize()
Optimizes the search engine index if it requires optimization. |
void |
optimize(String subIndex)
Optimizes the sub index if it requires optimization. |
void |
start()
Starts the given optimizer. |
void |
stop()
Stops the given optimizer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LuceneSearchEngineOptimizerManager(LuceneSearchEngineFactory searchEngineFactory)
| Method Detail |
|---|
public void configure(CompassSettings settings)
throws CompassException
CompassConfigurable
configure in interface CompassConfigurablesettings - The settings for the configured object
CompassException
public void start()
throws SearchEngineException
SearchEngineOptimizer
start in interface SearchEngineOptimizerSearchEngineException
public void stop()
throws SearchEngineException
SearchEngineOptimizerNote that if the optimizer is stopped while optimizing, it might take some time till the optimizer will actually stop.
stop in interface SearchEngineOptimizerSearchEngineExceptionpublic boolean isRunning()
SearchEngineOptimizertrue if the optimizer is running.
isRunning in interface SearchEngineOptimizer
public void optimize()
throws SearchEngineException
SearchEngineOptimizer
optimize in interface SearchEngineOptimizerSearchEngineException
public void optimize(String subIndex)
throws SearchEngineException
SearchEngineOptimizer
optimize in interface SearchEngineOptimizersubIndex - The sub index to optimize
SearchEngineException
public void forceOptimize()
throws SearchEngineException
SearchEngineOptimizer
forceOptimize in interface SearchEngineOptimizerSearchEngineException
public void forceOptimize(String subIndex)
throws SearchEngineException
SearchEngineOptimizer
forceOptimize in interface SearchEngineOptimizersubIndex - The sub index to optimize
SearchEngineExceptionpublic SearchEngineOptimizer getOptimizer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||