org.apache.lucene.search

## Class FilterManager.FilterCleaner

- java.lang.Object
- - org.apache.lucene.search.FilterManager.FilterCleaner

- All Implemented Interfaces:
    java.lang.Runnable
  Enclosing class:
    FilterManager

      protected class FilterManager.FilterCleaner
      extends java.lang.Object
      implements java.lang.Runnable

  Keeps the cache from getting too big. If we were using Java 1.5, we could use LinkedHashMap and we would not need this thread to clean out the cache. The SortedSet sortedFilterItems is used only to sort the items from the cache, so when it's time to clean up we have the TreeSet sort the FilterItems by timestamp. Removes 1.5 * the numbers of items to make the cache smaller. For example: If cache clean size is 10, and the cache is at 15, we would remove (15 - 10) * 1.5 = 7.5 round up to 8. This way we clean the cache a bit more, and avoid having the cache cleaner having to do it frequently.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FilterCleaner()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `run()`

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

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

- - ### Constructor Detail

    - #### FilterCleaner

          public FilterCleaner()

  - ### Method Detail

    - #### run

          public void run()

      Specified by:
        `run` in interface `java.lang.Runnable`

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