|
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.HybridCache
public class HybridCache
A hybrid cache solution that uses a (presumably small) LRU cache backed by a larger AutoCache. This implementation aims to be a good trade-off between cache hit frequency and agressive memory usage.
| Constructor Summary | |
|---|---|
HybridCache(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 |
objectRemoved(Serializable key,
Object value)
Called when an object is automatically removed from the LRU cache. |
void |
put(Serializable key,
Object object)
Adds an object to the cache. |
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 HybridCache(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 objectRemoved(Serializable key,
Object value)
objectRemoved in interface LRUCacheListener
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 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 | |||||||||