com.vignette.portal.cache
Class LiveUntilUnusedStrategy
java.lang.Object
|
+--com.vignette.portal.cache.CacheStrategy
|
+--com.vignette.portal.cache.ActionBasedCacheStrategy
|
+--com.vignette.portal.cache.TimeBasedStrategy
|
+--com.vignette.portal.cache.LiveUntilUnusedStrategy
- All Implemented Interfaces:
- Periodical
- public class LiveUntilUnusedStrategy
- extends TimeBasedStrategy
Computes expiration time based on last access.
| Methods inherited from class com.vignette.portal.cache.TimeBasedStrategy |
containsKey, getDefaultTimeout, getNeverExpireProperty, getOverrideTimeoutProperty, onAdd, onInvalidate, onInvalidateAll, onInvalidateAll, onPeriod, onPut, onPutAll, onRemove, onRemoveAll, onRemoveAll, updateExpirationTime |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LiveUntilUnusedStrategy
public LiveUntilUnusedStrategy(long defaultTimeout)
Creates a cache with specified timeout and with default action logic.
- Parameters:
defaultTimeout - the maximum time, in milliseconds, that objects are allowed in the cache.- See Also:
TimeBasedStrategy.TimeBasedStrategy(long)
LiveUntilUnusedStrategy
public LiveUntilUnusedStrategy(CacheAction action,
long defaultTimeout)
Creates a cache with specified timeout and with specified action logic.
- Parameters:
action - the non-null action to invoke when the size of the cache is exceeded.defaultTimeout - the maximum time, in milliseconds, that objects are allowed in the cache.- See Also:
TimeBasedStrategy.TimeBasedStrategy(CacheAction, long)
onGet
public void onGet(Object key,
Map properties)
throws CacheException
- Description copied from class:
CacheStrategy
Someone is accessing key in the Cache.
Individual strategies can use the information in
properties to override their creation-time parameters.
- Overrides:
onGet in class CacheStrategy
- Following copied from class:
com.vignette.portal.cache.CacheStrategy
- Parameters:
key - item being looked upproperties - possible overrides, can be null
Copyright and Trademark Notices