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
    Constructor and Description
    `SearcherLifetimeManager.PruneByAge(double maxAgeSec)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `doPrune(double ageSec, IndexSearcher searcher)` Return true if this searcher should be removed.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SearcherLifetimeManager.PruneByAge

          public SearcherLifetimeManager.PruneByAge(double maxAgeSec)

  - ### Method Detail

    - #### doPrune

          public boolean doPrune(double ageSec,
                        IndexSearcher searcher)

      Description copied from interface: `SearcherLifetimeManager.Pruner`
      Return true if this searcher should be removed.
      Specified by:
        `doPrune` in interface `SearcherLifetimeManager.Pruner`
      Parameters:
        `ageSec` - how much time has passed since this searcher was the current (live) searcher
        `searcher` - Searcher

Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.