66 friend class FilterCleaner;
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
Filter caching singleton. It can be used to save filters locally for reuse. Also could be used as a p...
Definition FilterManager.h:20
void setCleanThreadSleepTime(int64_t cleanSleepTime)
Sets the cache cleaning frequency in milliseconds.
static const int64_t DEFAULT_CACHE_SLEEP_TIME
The default frequency of cache cleanup.
Definition FilterManager.h:33
void setCacheSize(int32_t cacheCleanSize)
Sets the max size that cache should reach before it is cleaned up.
int64_t cleanSleepTime
Cache cleaning frequency.
Definition FilterManager.h:42
FilterCleanerPtr filterCleaner
Cache cleaner that runs in a separate thread.
Definition FilterManager.h:45
static FilterManagerPtr getInstance()
FilterPtr getFilter(const FilterPtr &filter)
Returns the cached version of the filter. Allows the caller to pass up a small filter but this will k...
FilterManager()
Sets up the FilterManager singleton.
static const int32_t DEFAULT_CACHE_CLEAN_SIZE
The default maximum number of Filters in the cache.
Definition FilterManager.h:30
int32_t cacheCleanSize
Maximum allowed cache size.
Definition FilterManager.h:39
virtual void initialize()
Called directly after instantiation to create objects that depend on this object being fully construc...
MapIntFilterItem cache
The cache itself.
Definition FilterManager.h:36
Base class for all Lucene classes.
Definition LuceneObject.h:31
Definition AbstractAllTermDocs.h:12
boost::shared_ptr< FilterCleaner > FilterCleanerPtr
Definition LuceneTypes.h:360
boost::shared_ptr< FilterManager > FilterManagerPtr
Definition LuceneTypes.h:367
boost::shared_ptr< Filter > FilterPtr
Definition LuceneTypes.h:358