org.compass.core.lucene.engine.optimizer
Class LuceneSearchEngineOptimizerManager

java.lang.Object
  extended by org.compass.core.lucene.engine.optimizer.LuceneSearchEngineOptimizerManager
All Implemented Interfaces:
CompassConfigurable, SearchEngineOptimizer

public class LuceneSearchEngineOptimizerManager
extends Object
implements CompassConfigurable, SearchEngineOptimizer

Author:
kimchy

Constructor Summary
LuceneSearchEngineOptimizerManager(LuceneSearchEngineFactory searchEngineFactory)
           
 
Method Summary
 void configure(CompassSettings settings)
          Configure using the given settings.
 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

LuceneSearchEngineOptimizerManager

public LuceneSearchEngineOptimizerManager(LuceneSearchEngineFactory searchEngineFactory)
Method Detail

configure

public void configure(CompassSettings settings)
               throws CompassException
Description copied from interface: CompassConfigurable
Configure using the given settings.

Specified by:
configure in interface CompassConfigurable
Parameters:
settings - The settings for the configured object
Throws:
CompassException

start

public void start()
           throws SearchEngineException
Description copied from interface: SearchEngineOptimizer
Starts the given optimizer. Will start a scheduled optimizer if configured.

Specified by:
start in interface SearchEngineOptimizer
Throws:
SearchEngineException

stop

public void stop()
          throws SearchEngineException
Description copied from interface: SearchEngineOptimizer
Stops the given optimizer. Will stop the scheduled optimizer if configured.

Note that if the optimizer is stopped while optimizing, it might take some time till the optimizer will actually stop.

Specified by:
stop in interface SearchEngineOptimizer
Throws:
SearchEngineException

isRunning

public boolean isRunning()
Description copied from interface: SearchEngineOptimizer
Returns true if the optimizer is running.

Specified by:
isRunning in interface SearchEngineOptimizer
Returns:
true if the optimizer is running

optimize

public void optimize()
              throws SearchEngineException
Description copied from interface: SearchEngineOptimizer
Optimizes the search engine index if it requires optimization.

Specified by:
optimize in interface SearchEngineOptimizer
Throws:
SearchEngineException

optimize

public void optimize(String subIndex)
              throws SearchEngineException
Description copied from interface: SearchEngineOptimizer
Optimizes the sub index if it requires optimization.

Specified by:
optimize in interface SearchEngineOptimizer
Parameters:
subIndex - The sub index to optimize
Throws:
SearchEngineException

getOptimizer

public SearchEngineOptimizer getOptimizer()


Copyright (c) 2004-2008 The Compass Project.