org.shiftone.cache.policy
Class AbstractPolicyCacheFactory
java.lang.Object
org.shiftone.cache.policy.AbstractPolicyCacheFactory
- All Implemented Interfaces:
- CacheFactory
- Direct Known Subclasses:
- FifoCacheFactory, LfuCacheFactory, LruCacheFactory
- public abstract class AbstractPolicyCacheFactory
- extends java.lang.Object
- implements CacheFactory
- Version:
- $Revision: 1.1 $
- Author:
- $Author: jeffdrost $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractPolicyCacheFactory
public AbstractPolicyCacheFactory()
newReapableCache
public abstract ReapableCache newReapableCache(java.lang.String cacheName,
long timeoutMilliSeconds,
int maxSize,
EvictionListener listener)
newInstance
public Cache newInstance(java.lang.String cacheName,
long timeoutMilliSeconds,
int maxSize)
- Specified by:
newInstance
in interface CacheFactory
getPeriod
public int getPeriod()
- time in milliseconds between calls from the reaper. Every "period"
milliseconds this factory's reaper will wake up and call
"removeExpiredElements" on the cache. Note that changing this value will
only effect new caches - all existing caches will continue with the same
period.
setPeriod
public void setPeriod(int period)
setEvictionListenerClass
public void setEvictionListenerClass(java.lang.Class evictionListenerClass)
getEvictionListener
public EvictionListener getEvictionListener()