Package org.apache.lucene.search
Class SearcherLifetimeManager.PruneByAge
java.lang.Object
org.apache.lucene.search.SearcherLifetimeManager.PruneByAge
- All Implemented Interfaces:
SearcherLifetimeManager.Pruner
- Enclosing class:
SearcherLifetimeManager
public static final class SearcherLifetimeManager.PruneByAge
extends Object
implements SearcherLifetimeManager.Pruner
Simple pruner that drops any searcher older by more than the specified seconds, than the newest
searcher.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandoPrune(double ageSec, IndexSearcher searcher) Return true if this searcher should be removed.
-
Constructor Details
-
PruneByAge
public PruneByAge(double maxAgeSec)
-
-
Method Details
-
doPrune
Description copied from interface:SearcherLifetimeManager.PrunerReturn true if this searcher should be removed.- Specified by:
doPrunein interfaceSearcherLifetimeManager.Pruner- Parameters:
ageSec- how much time has passed since this searcher was the current (live) searchersearcher- Searcher
-