Class JCoManagedFunctionCache


  • public class JCoManagedFunctionCache
    extends java.lang.Object
    Cache for Managed Functions.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DEFAULT_CACHE_TYPE
      Parameter value for connection parameter cacheType which indicates that this 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
    • Constructor Detail

      • JCoManagedFunctionCache

        public JCoManagedFunctionCache()
        Standard Constructor
        .
    • 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 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.