Lucene.Net
3.0.3
Lucene.Net is a port of the Lucene search engine library, written in C# and targeted at .NET runtime users.
|
Filter caching singleton. It can be used to save filters locally for reuse. This class makes it possble to cache Filters even when using RMI, as it keeps the cache on the seaercher side of the RMI connection. More...
Public Member Functions | |
virtual void | SetCacheSize (int value) |
Sets the max size that cache should reach before it is cleaned up | |
virtual void | SetCleanThreadSleepTime (long value) |
Sets the cache cleaning frequency in milliseconds. | |
virtual Filter | GetFilter (Filter filter) |
Returns the cached version of the filter. Allows the caller to pass up a small filter but this will keep a persistent version around and allow the caching filter to do its job. | |
Properties | |
static FilterManager | Instance [get] |
Filter caching singleton. It can be used to save filters locally for reuse. This class makes it possble to cache Filters even when using RMI, as it keeps the cache on the seaercher side of the RMI connection.
Also could be used as a persistent storage for any filter as long as the filter provides a proper hashCode(), as that is used as the key in the cache.
The cache is periodically cleaned up from a separate thread to ensure the cache doesn't exceed the maximum size.
Definition at line 37 of file FilterManager.cs.
Returns the cached version of the filter. Allows the caller to pass up a small filter but this will keep a persistent version around and allow the caching filter to do its job.
filter | The input filter |
Definition at line 105 of file FilterManager.cs.
|
virtual |
Sets the max size that cache should reach before it is cleaned up
value | maximum allowed cache size |
Definition at line 84 of file FilterManager.cs.
|
virtual |
Sets the cache cleaning frequency in milliseconds.
value | cleaning frequency in millioseconds |
Definition at line 91 of file FilterManager.cs.
|
staticget |
Definition at line 58 of file FilterManager.cs.