|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.tinygroup.jspengine.appserv.util.cache.BaseCache
org.tinygroup.jspengine.appserv.util.cache.MultiLruCache
org.tinygroup.jspengine.appserv.util.cache.BoundedMultiLruCache
public class BoundedMultiLruCache
MultiLruCache -- in-memory bounded LRU cache with multiple LRU lists Underlying Hashtable is made into logical segments, with each segment having its own LRU list.
| 嵌套类摘要 |
|---|
| 从类 org.tinygroup.jspengine.appserv.util.cache.BaseCache 继承的嵌套类/接口 |
|---|
BaseCache.CacheItem |
| 字段摘要 | |
|---|---|
protected long |
currentSize
|
protected long |
maxSize
|
| 从类 org.tinygroup.jspengine.appserv.util.cache.MultiLruCache 继承的字段 |
|---|
DEFAULT_HASHTABLE_SEGMENT_SIZE, listsLength, LRU_HEAD, LRU_TAIL |
| 从类 org.tinygroup.jspengine.appserv.util.cache.BaseCache 继承的字段 |
|---|
_rb, bucketLocks, buckets, entryCount, listeners, maxBuckets, refreshFlags, threshold |
| 构造方法摘要 | |
|---|---|
BoundedMultiLruCache()
|
|
| 方法摘要 | |
|---|---|
protected void |
decrementCurrentSize(int size)
|
Object |
getStatByName(String key)
get the desired statistic counter |
Map |
getStats()
get the stats snapshot |
protected void |
incrementCurrentSize(int size)
synchronized counter updates |
void |
init(int maxCapacity,
Properties props)
initialize the LRU cache |
protected boolean |
isThresholdReached()
has cache reached its threshold |
protected BaseCache.CacheItem |
itemAdded(BaseCache.CacheItem item)
this item is just added to the cache |
protected void |
itemRefreshed(BaseCache.CacheItem item,
int oldSize)
item value has been refreshed |
protected void |
itemRemoved(BaseCache.CacheItem item)
item value has been removed from the cache |
| 从类 org.tinygroup.jspengine.appserv.util.cache.MultiLruCache 继承的方法 |
|---|
createItem, handleOverflow, incrementTrimIndex, itemAccessed, trimLru |
| 从类 org.tinygroup.jspengine.appserv.util.cache.BaseCache 继承的方法 |
|---|
_put, _remove, _removeItem, add, add, addCacheListener, clear, clearStats, contains, decrementEntryCount, destroy, elements, eq, get, get, getAll, getEntryCount, getIndex, getIndex, hash, incrementAddCount, incrementEntryCount, incrementHitCount, incrementMissCount, incrementOverflowCount, incrementRefreshCount, incrementRemovalCount, init, isEmpty, keys, loadValue, notifyRefresh, put, put, remove, remove, remove, removeAll, trimExpiredEntries, trimItem, values, waitRefresh |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
protected long maxSize
protected long currentSize
| 构造方法详细信息 |
|---|
public BoundedMultiLruCache()
| 方法详细信息 |
|---|
public void init(int maxCapacity,
Properties props)
throws Exception
Cache 中的 initMultiLruCache 中的 initmaxCapacity - maximum number of entries this cache may holdprops - opaque list of properties for a given cache implementation
Exceptionprotected BaseCache.CacheItem itemAdded(BaseCache.CacheItem item)
MultiLruCache 中的 itemAddeditem - CacheItem that was created
protected void itemRefreshed(BaseCache.CacheItem item,
int oldSize)
MultiLruCache 中的 itemRefresheditem - CacheItem that was refreshedoldSize - size of the previous value that was refreshed
Cache bucket is already synchronized by the callerprotected void itemRemoved(BaseCache.CacheItem item)
MultiLruCache 中的 itemRemoveditem - CacheItem that was just removed
Cache bucket is already synchronized by the callerprotected boolean isThresholdReached()
BaseCache 中的 isThresholdReachedprotected final void incrementCurrentSize(int size)
protected final void decrementCurrentSize(int size)
public Object getStatByName(String key)
Cache 中的 getStatByNameMultiLruCache 中的 getStatByNamekey - to corresponding stat
public Map getStats()
MultiLruCache 复制的描述
Cache 中的 getStatsMultiLruCache 中的 getStats
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||