|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.torque.manager.MethodResultCache
public class MethodResultCache
This class provides a cache for convenient storage of method results.
| Constructor Summary | |
|---|---|
protected |
MethodResultCache()
Allows subclasses to have ctors that do not require a cache. |
|
MethodResultCache(org.apache.jcs.access.GroupCacheAccess cache)
Constructor |
| Method Summary | ||
|---|---|---|
void |
clear()
Clear the cache |
|
|
get(Serializable instanceOrClass,
String method,
Serializable... arg)
Get an object from the method cache |
|
protected Object |
getImpl(MethodCacheKey key)
|
|
|
put(T value,
Serializable instanceOrClass,
String method,
Serializable... arg)
Put an object into the method cache |
|
protected Object |
putImpl(MethodCacheKey key,
Object value)
|
|
|
remove(Serializable instanceOrClass,
String method,
Serializable... arg)
Remove object from method cache |
|
void |
removeAll(Serializable instanceOrClass,
String method)
Remove all objects of the same group |
|
protected Object |
removeImpl(MethodCacheKey key)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MethodResultCache(org.apache.jcs.access.GroupCacheAccess cache)
cache - the cache instance to useprotected MethodResultCache()
| Method Detail |
|---|
public void clear()
protected Object getImpl(MethodCacheKey key)
protected Object putImpl(MethodCacheKey key,
Object value)
throws TorqueException
TorqueExceptionprotected Object removeImpl(MethodCacheKey key)
public <T> T get(Serializable instanceOrClass,
String method,
Serializable... arg)
instanceOrClass - the Object on which the method is invoked. if
the method is static, a String representing the class name is used.method - the method namearg - optional arguments for the method
public <T> void put(T value,
Serializable instanceOrClass,
String method,
Serializable... arg)
value - the object to put into the cacheinstanceOrClass - the Object on which the method is invoked. if
the method is static, a String representing the class name is used.method - the method namearg - optional arguments for the method
public void removeAll(Serializable instanceOrClass,
String method)
instanceOrClass - the Object on which the method is invoked. if
the method is static, a String representing the class name is used.method - the method name
public <T> T remove(Serializable instanceOrClass,
String method,
Serializable... arg)
instanceOrClass - the Object on which the method is invoked. if
the method is static, a String representing the class name is used.method - the method namearg - optional arguments for the method
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||