|
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.AutoCache
public class AutoCache
This cache implementation uses soft references so that cached objects are automatically garbage collected when needed. Note that this maximizes the cache size at the expense of making no guarantees as to the cache-clearing algorithm used. So, it makes for good memory use at the possible expense of cache hit frequency.
| Constructor Summary | |
|---|---|
AutoCache(boolean monitorizeCaches)
|
|
| 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 |
setType(String cacheType)
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 AutoCache(boolean monitorizeCaches)
| Method Detail |
|---|
public void setType(String cacheType)
setType in interface ObjectCachepublic String getType()
ObjectCache
getType in interface ObjectCache
public void put(Serializable key,
Object object)
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 | |||||||||