Class CacheAdapterBase<V>

    • Field Detail

      • log

        protected org.apache.logging.log4j.Logger log
    • Constructor Detail

      • CacheAdapterBase

        public CacheAdapterBase()
    • Method Detail

      • getElement

        protected abstract V getElement​(String key)
      • putElement

        protected abstract void putElement​(String key,
                                           V value)
      • removeElement

        protected abstract boolean removeElement​(Object key)
      • toValue

        protected abstract V toValue​(Message value)
      • transformKey

        public String transformKey​(String input,
                                   PipeLineSession session)
        Description copied from interface: ICache
        Transform the the current request message to a key in the cache-map. Allows for instance XPath translations.
        Specified by:
        transformKey in interface ICache<String,​V>
      • transformValue

        public V transformValue​(Message value,
                                PipeLineSession session)
        Description copied from interface: ICache
        Transform the the current response message to a value in the cache-map. Allows for instance XPath translations.
        Specified by:
        transformValue in interface ICache<String,​V>
      • get

        public V get​(String key)
        Description copied from interface: ICache
        Obtain a potentially cached value, set by put().
        Specified by:
        get in interface ICache<String,​V>
      • put

        public void put​(String key,
                        V value)
        Description copied from interface: ICache
        store a value in the cache, that can be retrieved later using get().
        Specified by:
        put in interface ICache<String,​V>
      • remove

        public boolean remove​(String key)
      • setName

        public void setName​(String name)
        name of the cache, will be lowercased
        Default value
        <ownerName>_cache
      • getLogPrefix

        public String getLogPrefix()
      • setKeyXPath

        public void setKeyXPath​(String keyXPath)
        xpath expression to extract cache key from request message
      • setKeyXPathOutputType

        public void setKeyXPathOutputType​(TransformerPool.OutputType keyXPathOutputType)
        output type of xpath expression to extract cache key from request message
        Default value
        text
      • setKeyNamespaceDefs

        public void setKeyNamespaceDefs​(String keyNamespaceDefs)
        namespace defintions for keyxpath. must be in the form of a comma or space separated list of prefix=namespaceuri-definitions
      • setKeyStyleSheet

        public void setKeyStyleSheet​(String keyStyleSheet)
        stylesheet to extract cache key from request message. Use in combination with cacheEmptyKeys to inhibit caching for certain groups of request messages
      • setKeyInputSessionKey

        public void setKeyInputSessionKey​(String keyInputSessionKey)
        session key to use as input for transformation of request message to key by keyxpath or keystylesheet
      • setCacheEmptyKeys

        public void setCacheEmptyKeys​(boolean cacheEmptyKeys)
        controls whether empty keys are used for caching. when set true, cache entries with empty keys can exist.
        Default value
        false
      • setValueXPath

        public void setValueXPath​(String valueXPath)
        xpath expression to extract value to be cached key from response message. Use in combination with cacheEmptyValues to inhibit caching for certain groups of response messages
      • setValueNamespaceDefs

        public void setValueNamespaceDefs​(String valueNamespaceDefs)
        namespace defintions for valuexpath. must be in the form of a comma or space separated list of prefix=namespaceuri-definitions
      • setValueStyleSheet

        public void setValueStyleSheet​(String valueStyleSheet)
        stylesheet to extract value to be cached from response message
      • setValueInputSessionKey

        public void setValueInputSessionKey​(String valueInputSessionKey)
        session key to use as input for transformation of response message to cached value by valuexpath or valuestylesheet
      • setCacheEmptyValues

        public void setCacheEmptyValues​(boolean cacheEmptyValues)
        controls whether empty values will be cached. when set true, empty cache entries can exist for any key.
        Default value
        false
      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
      • getKeyXPath

        public String getKeyXPath()
      • getKeyNamespaceDefs

        public String getKeyNamespaceDefs()
      • getKeyStyleSheet

        public String getKeyStyleSheet()
      • getKeyInputSessionKey

        public String getKeyInputSessionKey()
      • isCacheEmptyKeys

        public boolean isCacheEmptyKeys()
      • getValueXPath

        public String getValueXPath()
      • getValueNamespaceDefs

        public String getValueNamespaceDefs()
      • getValueStyleSheet

        public String getValueStyleSheet()
      • getValueInputSessionKey

        public String getValueInputSessionKey()
      • isCacheEmptyValues

        public boolean isCacheEmptyValues()