CachingWrapperFilter
if you wish to cache
Filter
s.@Deprecated public class FilterManager extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
FilterManager.FilterCleaner
Deprecated.
Keeps the cache from getting too big.
|
protected class |
FilterManager.FilterItem
Deprecated.
Holds the filter and the last time the filter was used, to make LRU-based
cache cleaning possible.
|
Modifier and Type | Field and Description |
---|---|
protected Map<Integer,FilterManager.FilterItem> |
cache
Deprecated.
The cache itself
|
protected int |
cacheCleanSize
Deprecated.
Maximum allowed cache size
|
protected long |
cleanSleepTime
Deprecated.
Cache cleaning frequency
|
protected static int |
DEFAULT_CACHE_CLEAN_SIZE
Deprecated.
The default maximum number of Filters in the cache
|
protected static long |
DEFAULT_CACHE_SLEEP_TIME
Deprecated.
The default frequency of cache cleanup
|
protected FilterManager.FilterCleaner |
filterCleaner
Deprecated.
Cache cleaner that runs in a separate thread
|
protected static FilterManager |
manager
Deprecated.
|
Modifier | Constructor and Description |
---|---|
protected |
FilterManager()
Deprecated.
Sets up the FilterManager singleton.
|
Modifier and Type | Method and Description |
---|---|
Filter |
getFilter(Filter filter)
Deprecated.
Returns the cached version of the filter.
|
static FilterManager |
getInstance()
Deprecated.
|
void |
setCacheSize(int cacheCleanSize)
Deprecated.
Sets the max size that cache should reach before it is cleaned up
|
void |
setCleanThreadSleepTime(long cleanSleepTime)
Deprecated.
Sets the cache cleaning frequency in milliseconds.
|
protected static FilterManager manager
protected static final int DEFAULT_CACHE_CLEAN_SIZE
protected static final long DEFAULT_CACHE_SLEEP_TIME
protected Map<Integer,FilterManager.FilterItem> cache
protected int cacheCleanSize
protected long cleanSleepTime
protected FilterManager.FilterCleaner filterCleaner
protected FilterManager()
public static FilterManager getInstance()
public void setCacheSize(int cacheCleanSize)
cacheCleanSize
- maximum allowed cache sizepublic void setCleanThreadSleepTime(long cleanSleepTime)
cleanSleepTime
- cleaning frequency in millisecondspublic Filter getFilter(Filter filter)
filter
- The input filter