|
Dashboard Builder Commons 6.0.0.Beta1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.dashboard.database.cache.custom.LRUCache
public class LRUCache
Cache implementation that uses the Least Recently Used algorithm. This algorithm provides good cache hit frequency.
| Nested Class Summary | |
|---|---|
class |
LRUCache.ListeningLRUMap
|
| Constructor Summary | |
|---|---|
LRUCache(boolean monitorizeCaches,
int size)
|
|
| Method Summary | |
|---|---|
Object |
clear(Serializable key)
Clears an object from the cache by key. |
void |
clearAll()
Clears the entire cache. |
Object |
get(Serializable key)
Gets an object from the cache by key, or returns null if that object is not cached. |
CacheStatistics |
getCacheStatistics()
Get the cache statistics |
String |
getType()
Gets the common name of the type of objects to cache. |
void |
put(Serializable key,
Object object)
Adds an object to the cache. |
void |
setListener(LRUCacheListener l)
|
void |
setType(String type)
Sets the common name of the type of objects to cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LRUCache(boolean monitorizeCaches,
int size)
| Method Detail |
|---|
public String getType()
ObjectCache
getType in interface ObjectCachepublic void setType(String type)
ObjectCache
setType in interface ObjectCache
public void put(Serializable key,
Object object)
ObjectCache
put in interface ObjectCachepublic Object get(Serializable key)
ObjectCache
get in interface ObjectCachepublic Object clear(Serializable key)
ObjectCache
clear in interface ObjectCachepublic void clearAll()
ObjectCache
clearAll in interface ObjectCachepublic void setListener(LRUCacheListener l)
public CacheStatistics getCacheStatistics()
StatisticsObjectCache
getCacheStatistics in interface StatisticsObjectCache
|
Dashboard Builder Commons 6.0.0.Beta1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||