|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jso.cache.LRUCache
Constructor Summary | |
LRUCache(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. |
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 LRUCache(int sz)
Method Detail |
public java.lang.Object put(java.lang.Object key, java.lang.Object obj)
Cache
put
in interface Cache
key
- 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 Cache
key
- The key to which the object is associated.
null
is returned.public void invalidate()
Cache
invalidate
in interface Cache
public CacheInfo getCacheInfo()
Cache
getCacheInfo
in interface Cache
public long accesses()
CacheInfo
Cache.get()
method.
accesses
in interface CacheInfo
public long hits()
CacheInfo
Cache.get()
method.
hits
in interface CacheInfo
public long misses()
CacheInfo
Cache.get()
method.
misses
in interface CacheInfo
public int size()
CacheInfo
size
in interface CacheInfo
public int inUse()
CacheInfo
inUse
in interface CacheInfo
public java.lang.String algorithm()
CacheInfo
algorithm
in interface CacheInfo
public 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 |