Class JCoManagedFunctionCache
java.lang.Object
de.hybris.platform.sap.core.jco.connection.impl.JCoManagedFunctionCache
Cache for Managed Functions.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringParameter value for connection parameter cacheType which indicates that this function should be cached. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecuteCachedFunction(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 Details
-
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:
-
-
Constructor Details
-
JCoManagedFunctionCache
public JCoManagedFunctionCache()Standard Constructor
.
-
-
Method Details
-
isFunctionCached
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 BackendException Execute 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.
-