Class JCoManagedFunctionCache
- java.lang.Object
-
- de.hybris.platform.sap.core.jco.connection.impl.JCoManagedFunctionCache
-
public class JCoManagedFunctionCache extends java.lang.ObjectCache for Managed Functions.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_CACHE_TYPEParameter value for connection parameter cacheType which indicates that this function should be cached.
-
Constructor Summary
Constructors Constructor Description JCoManagedFunctionCache()Standard Constructor
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecuteCachedFunction(com.sap.conn.jco.JCoDestination destination, JCoManagedFunction function)Execute function which is marked for caching.booleanisFunctionCached(JCoManagedFunction function)Check if given function should be cached.
-
-
-
Field Detail
-
DEFAULT_CACHE_TYPE
public static final java.lang.String DEFAULT_CACHE_TYPE
Parameter value for connection parameter cacheType which indicates that this function should be cached. Parameter is set in spring definition of JCoConnectionParameter.- See Also:
- Constant Field Values
-
-
Method Detail
-
isFunctionCached
public boolean isFunctionCached(JCoManagedFunction function)
Check if given function should be cached.- Parameters:
function- function to be cached.- Returns:
- true if function should be cached. False otherwise.
-
executeCachedFunction
public void executeCachedFunction(com.sap.conn.jco.JCoDestination destination, JCoManagedFunction function) throws BackendExceptionExecute function which is marked for caching.
First call gets the values from the backend and stores the result in the cache. Subsequent calls are served from the cache.- Parameters:
destination- destination.function- function.- Throws:
BackendException- thrown in case of execution fails.
-
-