Class UnboundedEJBObjectCache

  • All Implemented Interfaces:
    com.sun.appserv.util.cache.Cache, EJBObjectCache

    public class UnboundedEJBObjectCache
    extends com.sun.appserv.util.cache.BaseCache
    implements EJBObjectCache
    An EJB(Local)Object cache that does not impose any limit on the number of entries
    Author:
    Mahesh Kannan
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.sun.appserv.util.cache.BaseCache

        com.sun.appserv.util.cache.BaseCache.CacheItem
    • Field Summary

      • Fields inherited from class com.sun.appserv.util.cache.BaseCache

        bucketLocks, buckets, entryCount, hitCount, listeners, maxBuckets, maxEntries, missCount, refreshFlags, removalCount, threshold
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Object get​(Object key, boolean incrementRefCount)  
      Map getStats()  
      void init​(int maxEntries, int numberOfVictimsToSelect, long timeout, float loadFactor, Properties props)  
      Object put​(Object key, Object value, boolean linkWithLru)  
      Object remove​(Object key, boolean decrementRefCount)  
      void setEJBObjectCacheListener​(EJBObjectCacheListener listener)  
      protected void trimItem​(com.sun.appserv.util.cache.BaseCache.CacheItem item)  
      • Methods inherited from class com.sun.appserv.util.cache.BaseCache

        _put, _remove, _removeItem, add, add, addCacheListener, clear, clearStats, contains, createItem, decrementEntryCount, destroy, elements, eq, get, get, getAll, getEntryCount, getIndex, getIndex, getStatByName, handleOverflow, hash, incrementAddCount, incrementEntryCount, incrementHitCount, incrementMissCount, incrementOverflowCount, incrementRefreshCount, incrementRemovalCount, init, init, isEmpty, isThresholdReached, itemAccessed, itemAdded, itemRefreshed, itemRemoved, keys, loadValue, notifyRefresh, put, put, remove, remove, remove, removeAll, trimExpiredEntries, values, waitRefresh
      • Methods inherited from interface com.sun.appserv.util.cache.Cache

        add, add, addCacheListener, clear, clearStats, contains, destroy, elements, get, getAll, getEntryCount, getIndex, getStatByName, init, init, isEmpty, keys, notifyRefresh, put, put, remove, remove, removeAll, trimExpiredEntries, values, waitRefresh
    • Constructor Detail

      • UnboundedEJBObjectCache

        public UnboundedEJBObjectCache​(String name)
        default constructor
      • UnboundedEJBObjectCache

        public UnboundedEJBObjectCache​(String name,
                                       long timeout)
        constructor with specified timeout
    • Method Detail

      • init

        public void init​(int maxEntries,
                         int numberOfVictimsToSelect,
                         long timeout,
                         float loadFactor,
                         Properties props)
        Specified by:
        init in interface EJBObjectCache
      • trimItem

        protected void trimItem​(com.sun.appserv.util.cache.BaseCache.CacheItem item)
        Overrides:
        trimItem in class com.sun.appserv.util.cache.BaseCache
      • getStats

        public Map getStats()
        Specified by:
        getStats in interface com.sun.appserv.util.cache.Cache
        Overrides:
        getStats in class com.sun.appserv.util.cache.BaseCache