Class NRUSessionCache
- java.lang.Object
-
- com.sun.appserv.util.cache.BaseCache
-
- com.sun.appserv.util.cache.LruCache
-
- com.sun.ejb.containers.util.cache.LruEJBCache
-
- com.sun.ejb.containers.util.cache.LruSessionCache
-
- com.sun.ejb.containers.util.cache.NRUSessionCache
-
- All Implemented Interfaces:
Cache
,EjbCacheStatsProviderDelegate
,StatsProvider
public class NRUSessionCache extends LruSessionCache
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.sun.ejb.containers.util.cache.LruSessionCache
LruSessionCache.LruSessionCacheItem
-
Nested classes/interfaces inherited from class com.sun.appserv.util.cache.LruCache
LruCache.LruCacheItem
-
Nested classes/interfaces inherited from class com.sun.appserv.util.cache.BaseCache
BaseCache.CacheItem
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
doOrdering
protected int
orderingThreshold
-
Fields inherited from class com.sun.ejb.containers.util.cache.LruSessionCache
backingStore, cacheIdleTimeoutInSeconds, configData, confMaxCacheSize, container, loadCountLock, loadFromBackupCount, removalTimeoutInSeconds, removeIfIdle
-
Fields inherited from class com.sun.ejb.containers.util.cache.LruEJBCache
_logger, cacheName
-
Fields inherited from class com.sun.appserv.util.cache.LruCache
defaultMaxEntries, head, isUnbounded, listSize, NO_TIMEOUT, tail, timeout, trimCount
-
Fields inherited from class com.sun.appserv.util.cache.BaseCache
bucketLocks, buckets, entryCount, hitCount, listeners, maxBuckets, maxEntries, missCount, refreshFlags, removalCount, threshold
-
-
Constructor Summary
Constructors Constructor Description NRUSessionCache(String cacheName, SFSBContainerCallback container, int cacheIdleTime, int removalTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
init(int maxEntries, float loadFactor, Properties props)
initialize the cacheprotected void
itemAccessed(BaseCache.CacheItem item)
this item is accessedprotected BaseCache.CacheItem
itemAdded(BaseCache.CacheItem item)
/** this item is just added to the cacheprotected void
itemRefreshed(BaseCache.CacheItem item, int oldSize)
item value has been refreshedprotected void
itemRemoved(BaseCache.CacheItem item)
item value has been removed from the cachevoid
trimTimedoutItems(int maxCount)
trim the timedOut entries from the cache.-
Methods inherited from class com.sun.ejb.containers.util.cache.LruSessionCache
appendStats, createItem, destroy, eligibleForRemovalFromCache, getCacheHits, getCacheMisses, getLoadFromBackupCount, getMaxCacheSize, getNumBeansInCache, getNumExpiredSessionsRemoved, getNumPassivationErrors, getNumPassivations, getNumPassivationSuccess, getNumVictimsAccessed, incrementLoadFromBackupCount, lookupEJB, passivateEJB, remove, remove, setBackingStore, setConfigData, setMaxCacheSize, setShutdownState, setStatefulSessionStoreMonitor, setUndeployedState, shutdown, trimItem, trimUnSortedTimedoutItems, values
-
Methods inherited from class com.sun.ejb.containers.util.cache.LruEJBCache
setCacheName, trimLru
-
Methods inherited from class com.sun.appserv.util.cache.LruCache
getStatByName, getStats, init, setTimeout, trimExpiredEntries
-
Methods inherited from class com.sun.appserv.util.cache.BaseCache
_put, _remove, _removeItem, add, add, addCacheListener, clear, clearStats, contains, decrementEntryCount, elements, eq, get, get, getAll, getEntryCount, getIndex, getIndex, handleOverflow, hash, incrementAddCount, incrementEntryCount, incrementHitCount, incrementMissCount, incrementOverflowCount, incrementRefreshCount, incrementRemovalCount, init, isEmpty, isThresholdReached, keys, loadValue, notifyRefresh, put, put, remove, remove, removeAll, waitRefresh
-
-
-
-
Constructor Detail
-
NRUSessionCache
public NRUSessionCache(String cacheName, SFSBContainerCallback container, int cacheIdleTime, int removalTime)
-
-
Method Detail
-
init
public void init(int maxEntries, float loadFactor, Properties props)
Description copied from class:BaseCache
initialize the cache
-
itemAdded
protected BaseCache.CacheItem itemAdded(BaseCache.CacheItem item)
Description copied from class:LruCache
/** this item is just added to the cache- Overrides:
itemAdded
in classLruEJBCache
- Parameters:
item
-CacheItem
that was created- Returns:
- a overflow item; may be null this function checks if adding the new item results in a overflow; if so, it returns the item to be removed. Cache bucket is already synchronized by the caller
-
itemAccessed
protected void itemAccessed(BaseCache.CacheItem item)
Description copied from class:LruCache
this item is accessed- Overrides:
itemAccessed
in classLruSessionCache
- Parameters:
item
-CacheItem
accessed Cache bucket is already synchronized by the caller
-
itemRefreshed
protected void itemRefreshed(BaseCache.CacheItem item, int oldSize)
Description copied from class:LruCache
item value has been refreshed- Overrides:
itemRefreshed
in classLruCache
- Parameters:
item
-CacheItem
that was refreshedoldSize
- size of the previous value that was refreshed Cache bucket is already synchronized by the caller
-
itemRemoved
protected void itemRemoved(BaseCache.CacheItem item)
Description copied from class:LruCache
item value has been removed from the cache- Overrides:
itemRemoved
in classLruCache
- Parameters:
item
-CacheItem
that was just removed Cache bucket is already synchronized by the caller
-
trimTimedoutItems
public void trimTimedoutItems(int maxCount)
Description copied from class:LruSessionCache
trim the timedOut entries from the cache. This call is to be scheduled by a thread managed by the container. In this case a sorted LRU list exists based on access time and this list is scanned- Overrides:
trimTimedoutItems
in classLruSessionCache
-
-