Interface ScriptResourceCacheManager<K extends java.lang.String,​V extends ExecutableCompiledGroovyScript>

    • Field Detail

      • BEAN_NAME

        static final java.lang.String BEAN_NAME
        Bean name for script resource cache manager.
        See Also:
        Constant Field Values
    • Method Detail

      • computeKey

        static java.lang.String computeKey​(java.lang.String... keys)
        Compute key.
        Parameters:
        keys - the keys
        Returns:
        the key
      • get

        V get​(K key)
        Get item.
        Parameters:
        key - the key
        Returns:
        the item
      • containsKey

        boolean containsKey​(K key)
        Contains key ?
        Parameters:
        key - the key
        Returns:
        the boolean
      • put

        ScriptResourceCacheManager<K,​V> put​(K key,
                                                  V value)
        Put script resource cache manager.
        Parameters:
        key - the key
        value - the value
        Returns:
        the script resource cache manager
      • remove

        ScriptResourceCacheManager<K,​V> remove​(K key)
        Remove script resource cache manager.
        Parameters:
        key - the key
        Returns:
        the script resource cache manager
      • getKeys

        java.util.Set<java.lang.String> getKeys()
        Gets keys.
        Returns:
        the keys
      • clear

        @CanIgnoreReturnValue
        default ScriptResourceCacheManager<K,​V> clear()
        Clear items.
        Returns:
        the groovy script resource cache manager
      • close

        void close()
        Specified by:
        close in interface java.lang.AutoCloseable
      • destroy

        default void destroy()
        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean
      • isEmpty

        boolean isEmpty()
        Is cache empty?
        Returns:
        true/false
      • resolveScriptableResource

        ExecutableCompiledGroovyScript resolveScriptableResource​(java.lang.String scriptResource,
                                                                 java.lang.String... keys)
        Resolve scriptable resource executable.
        Parameters:
        scriptResource - the script resource
        keys - the keys
        Returns:
        the executable compiled groovy script