Lucene++ - a full-featured, c++ search engine
API Documentation

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
FilterManager.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2011 Alan Wright. All rights reserved.
3 // Distributable under the terms of either the Apache License (Version 2.0)
4 // or the GNU Lesser General Public License.
6
7 #ifndef FILTERMANAGER_H
8 #define FILTERMANAGER_H
9
10 #include "LuceneObject.h"
11
12 namespace Lucene
13 {
20 class LPPAPI FilterManager : public LuceneObject
21 {
22 public:
24 FilterManager();
25 virtual ~FilterManager();
26
27 LUCENE_CLASS(FilterManager);
28
29 protected:
31 static const int32_t DEFAULT_CACHE_CLEAN_SIZE;
32
34 static const int64_t DEFAULT_CACHE_SLEEP_TIME;
35
37 MapIntFilterItem cache;
38
40 int32_t cacheCleanSize;
41
43 int64_t cleanSleepTime;
44
46 FilterCleanerPtr filterCleaner;
47
48 public:
49 virtual void initialize();
50
51 static FilterManagerPtr getInstance();
52
55 void setCacheSize(int32_t cacheCleanSize);
56
59 void setCleanThreadSleepTime(int64_t cleanSleepTime);
60
65 FilterPtr getFilter(FilterPtr filter);
66
67 friend class FilterCleaner;
68 };
69 }
70
71 #endif

clucene.sourceforge.net