|
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.TimerCache
public class TimerCache
Cache implementation that times out cached elements. Each item put in the cache is timed out after a specified number of milliseconds (unless removed before the timeout).
| Constructor Summary | |
|---|---|
TimerCache(boolean monitorizeCaches,
long timeout,
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 cache type name. |
void |
put(Serializable key,
Object object)
Caches an object. |
void |
run()
|
protected void |
setDeadline(long time)
|
void |
setTimeout(long newTimeout)
Sets a new timeout value-- only do this before using the cache! |
void |
setType(String type)
Sets the cache type name. |
void |
stop()
Called to stop the timer thread. |
protected void |
trimQueue(SynchronizedLRUMap cache)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TimerCache(boolean monitorizeCaches,
long timeout,
int size)
| Method Detail |
|---|
public void setTimeout(long newTimeout)
public void stop()
public String getType()
getType in interface ObjectCachepublic void setType(String type)
setType in interface ObjectCache
public void put(Serializable key,
Object object)
null, then any object cached at the given key is removed from the cache.
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 ObjectCacheprotected void setDeadline(long time)
public void run()
run in interface Runnableprotected void trimQueue(SynchronizedLRUMap cache)
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 | |||||||||