Class UnboundedEJBObjectCache

java.lang.Object
com.sun.appserv.util.cache.BaseCache
org.glassfish.persistence.ejb.entitybean.container.cache.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
  • Constructor Summary

    Constructors
    Constructor
    Description
    default constructor
    UnboundedEJBObjectCache(String name, long timeout)
    constructor with specified timeout
  • Method Summary

    Modifier and Type
    Method
    Description
    get(Object key, boolean incrementRefCount)
     
     
    void
    init(int maxEntries, int numberOfVictimsToSelect, long timeout, float loadFactor, Properties props)
     
    put(Object key, Object value, boolean linkWithLru)
     
    remove(Object key, boolean decrementRefCount)
     
    void
     
    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 class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    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 Details

    • UnboundedEJBObjectCache

      public UnboundedEJBObjectCache(String name)
      default constructor
    • UnboundedEJBObjectCache

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

    • init

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

      public Object get(Object key, boolean incrementRefCount)
      Specified by:
      get in interface EJBObjectCache
    • put

      public Object put(Object key, Object value, boolean linkWithLru)
      Specified by:
      put in interface EJBObjectCache
    • remove

      public Object remove(Object key, boolean decrementRefCount)
      Specified by:
      remove in interface EJBObjectCache
    • setEJBObjectCacheListener

      public void setEJBObjectCacheListener(EJBObjectCacheListener listener)
      Specified by:
      setEJBObjectCacheListener 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