|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.spy.SpyObject
net.spy.cache.SimpleCache
public class SimpleCache
A simple time-based cache.
| Constructor Summary | |
|---|---|
protected |
SimpleCache()
Get an instance of SimpleCache. |
| Method Summary | |
|---|---|
Object |
get(String key)
Get an object from the cache. |
static SimpleCache |
getInstance()
Get the singleton SimpleCache instance. |
Object |
remove(String key)
Remove an object from the cache. |
boolean |
remove(String key,
Object value)
Conditionally remove an object from the cache. |
static void |
setInstance(SimpleCache to)
Set the singleton SimpleCache instance. |
void |
store(String key,
Object value,
long timeout)
Store an object in the cache. |
| Methods inherited from class net.spy.SpyObject |
|---|
getLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected SimpleCache()
| Method Detail |
|---|
public static SimpleCache getInstance()
public static void setInstance(SimpleCache to)
public Object get(String key)
key - the cache key
public void store(String key,
Object value,
long timeout)
key - the cache keytimeout - how long until it's deletedvalue - the value to cachepublic Object remove(String key)
key - the key of the object to remove
public boolean remove(String key,
Object value)
key - the keyvalue - the value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||