|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sf.jso.cache.PriorityCache
| Constructor Summary | |
PriorityCache(int sz)
|
|
| Method Summary | |
long |
accesses()
Informs how many times the cache has been accessed through Cache.get() method. |
java.lang.String |
algorithm()
Informs the algorithm used by the cache for entry management. |
java.lang.String |
description()
Informs a description of the entry management algorithm. |
java.lang.Object |
get(java.lang.Object key)
Gets an object in the cache. |
CacheInfo |
getCacheInfo()
Gets cache information. |
long |
hits()
Informs how many times the cache could return a valid object associated with a key through Cache.get() method. |
int |
inUse()
Informs the cache usage. |
void |
invalidate()
Invalidates all cached objects. |
void |
invalidate(java.lang.Object key)
|
long |
misses()
Informs how many times the cache could not find any object associated with a key through Cache.get() method. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object obj)
Puts an object in the cache. |
int |
size()
Informs the cache size. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PriorityCache(int sz)
| Method Detail |
public java.lang.Object put(java.lang.Object key,
java.lang.Object obj)
Cache
put in interface Cachekey - A key with which the specified object is to be associated.obj - An object to be associated with the specified key.public java.lang.Object get(java.lang.Object key)
Cache
get in interface Cachekey - The key to which the object is associated.
null is returned.public void invalidate()
Cache
invalidate in interface Cachepublic void invalidate(java.lang.Object key)
public CacheInfo getCacheInfo()
Cache
getCacheInfo in interface Cachepublic long accesses()
CacheInfoCache.get() method.
accesses in interface CacheInfopublic long hits()
CacheInfoCache.get() method.
hits in interface CacheInfopublic long misses()
CacheInfoCache.get() method.
misses in interface CacheInfopublic int size()
CacheInfo
size in interface CacheInfopublic int inUse()
CacheInfo
inUse in interface CacheInfopublic java.lang.String algorithm()
CacheInfo
algorithm in interface CacheInfopublic java.lang.String description()
CacheInfo
description in interface CacheInfo
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||