Package org.apache.torque.manager
Class NoOpMethodResultCache
java.lang.Object
org.apache.torque.manager.MethodResultCache
org.apache.torque.manager.NoOpMethodResultCache
This class provides a no-op cache for convenient storage of method results
- Version:
- $Id: NoOpMethodResultCache.java 1917233 2024-04-21 11:37:11Z tv $
- Author:
- John McNally
-
Constructor Summary
ConstructorsConstructorDescriptionNoOpMethodResultCache(org.apache.commons.jcs3.access.GroupCacheAccess<MethodCacheKey, Object> cache) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear the cache<T> Tget(Serializable instanceOrClass, String method, Serializable... arg) Get an object from the method cacheprotected ObjectgetImpl(MethodCacheKey key) <T> voidput(T value, Serializable instanceOrClass, String method, Serializable... arg) Put an object into the method cacheprotected ObjectputImpl(MethodCacheKey key, Object value) <T> Tremove(Serializable instanceOrClass, String method, Serializable... arg) Remove object from method cachevoidremoveAll(Serializable instanceOrClass, String method) Remove all objects of the same groupprotected ObjectremoveImpl(MethodCacheKey key)
-
Constructor Details
-
NoOpMethodResultCache
public NoOpMethodResultCache(org.apache.commons.jcs3.access.GroupCacheAccess<MethodCacheKey, Object> cache)
-
-
Method Details
-
clear
public void clear()Clear the cache- Overrides:
clearin classMethodResultCache
-
getImpl
- Overrides:
getImplin classMethodResultCache- See Also:
-
putImpl
- Overrides:
putImplin classMethodResultCache- Throws:
TorqueException- See Also:
-
removeImpl
- Overrides:
removeImplin classMethodResultCache- See Also:
-
get
Description copied from class:MethodResultCacheGet an object from the method cache- Overrides:
getin classMethodResultCache- Type Parameters:
T- type of the instance class- Parameters:
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- Returns:
- the object or null if it does not exist
- See Also:
-
put
Description copied from class:MethodResultCachePut an object into the method cache- Overrides:
putin classMethodResultCache- Type Parameters:
T- type of the instance class- Parameters:
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- See Also:
-
removeAll
Description copied from class:MethodResultCacheRemove all objects of the same group- Overrides:
removeAllin classMethodResultCache- Parameters:
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- See Also:
-
remove
Description copied from class:MethodResultCacheRemove object from method cache- Overrides:
removein classMethodResultCache- Type Parameters:
T- type of the instance class- Parameters:
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- Returns:
- the removed object
- See Also:
-