Class NRUSessionCache

    • Field Detail

      • doOrdering

        protected boolean doOrdering
      • orderingThreshold

        protected int orderingThreshold
    • 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
        Specified by:
        init in interface Cache
        Overrides:
        init in class BaseCache
        Parameters:
        maxEntries - maximum number of entries expected in the cache
        loadFactor - the load factor
        props - opaque list of properties for a given cache implementation
      • itemAdded

        protected BaseCache.CacheItem itemAdded​(BaseCache.CacheItem item)
        Description copied from class: LruCache
        /** this item is just added to the cache
        Overrides:
        itemAdded in class LruEJBCache
        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 class LruSessionCache
        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 class LruCache
        Parameters:
        item - CacheItem that was refreshed
        oldSize - 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 class LruCache
        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 class LruSessionCache