Class UnboundedEJBObjectCache
- java.lang.Object
-
- com.sun.appserv.util.cache.BaseCache
-
- org.glassfish.persistence.ejb.entitybean.container.cache.UnboundedEJBObjectCache
-
- All Implemented Interfaces:
Cache,EJBObjectCache
public class UnboundedEJBObjectCache extends 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
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 UnboundedEJBObjectCache(String name)default constructorUnboundedEJBObjectCache(String name, long timeout)constructor with specified timeout
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectget(Object key, boolean incrementRefCount)MapgetStats()get the stats snapshotvoidinit(int maxEntries, int numberOfVictimsToSelect, long timeout, float loadFactor, Properties props)Objectput(Object key, Object value, boolean linkWithLru)Objectremove(Object key, boolean decrementRefCount)voidsetEJBObjectCacheListener(EJBObjectCacheListener listener)protected voidtrimItem(BaseCache.CacheItem item)trim the item from the cache and notify listeners-
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
-
-
-
-
Method Detail
-
init
public void init(int maxEntries, int numberOfVictimsToSelect, long timeout, float loadFactor, Properties props)- Specified by:
initin interfaceEJBObjectCache
-
get
public Object get(Object key, boolean incrementRefCount)
- Specified by:
getin interfaceEJBObjectCache
-
put
public Object put(Object key, Object value, boolean linkWithLru)
- Specified by:
putin interfaceEJBObjectCache
-
remove
public Object remove(Object key, boolean decrementRefCount)
- Specified by:
removein interfaceEJBObjectCache
-
setEJBObjectCacheListener
public void setEJBObjectCacheListener(EJBObjectCacheListener listener)
- Specified by:
setEJBObjectCacheListenerin interfaceEJBObjectCache
-
trimItem
protected void trimItem(BaseCache.CacheItem item)
Description copied from class:BaseCachetrim the item from the cache and notify listeners
-
-