|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.scooterframework.cache.NamedCurrentThreadCache
public class NamedCurrentThreadCache
NamedCurrentThreadCache provides a named cache for current request thread.
The scope of a NamedCurrentThreadCache is just the current request. If the current thread completes, all objects cached in it will be removed.
| Constructor Summary | |
|---|---|
NamedCurrentThreadCache(java.lang.String name)
|
|
| Method Summary | |
|---|---|
void |
clear()
Removes all key/value pairs from cache. |
java.lang.Object |
get(java.lang.Object key)
Returns object from cache based on key. |
java.lang.Object |
getDelegateCache()
Returns the underlying cache. |
java.util.Collection<java.lang.Object> |
getKeys()
Returns keys in the cache |
java.lang.String |
getName()
Returns the cache name. |
java.util.Properties |
getStatistics()
Returns the Cache statistics. |
boolean |
put(java.lang.Object key,
java.lang.Object value)
Stores object into cache based on key. |
boolean |
remove(java.lang.Object key)
Removes the mapping for this key from the cache if present. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NamedCurrentThreadCache(java.lang.String name)
| Method Detail |
|---|
public java.lang.Object getDelegateCache()
getDelegateCache in interface Cachepublic java.lang.String getName()
getName in interface Cachepublic java.util.Collection<java.lang.Object> getKeys()
getKeys in interface Cachepublic java.lang.Object get(java.lang.Object key)
get in interface Cache
public boolean put(java.lang.Object key,
java.lang.Object value)
put in interface Cachepublic boolean remove(java.lang.Object key)
remove in interface Cachepublic void clear()
clear in interface Cachepublic java.util.Properties getStatistics()
getStatistics in interface Cache
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||