Package org.apereo.cas.util.scripting
Interface ScriptResourceCacheManager<K extends java.lang.String,V extends ExecutableCompiledGroovyScript>
-
- All Superinterfaces:
java.lang.AutoCloseable,org.springframework.beans.factory.DisposableBean
- All Known Implementing Classes:
GroovyScriptResourceCacheManager
public interface ScriptResourceCacheManager<K extends java.lang.String,V extends ExecutableCompiledGroovyScript> extends java.lang.AutoCloseable, org.springframework.beans.factory.DisposableBeanThis isScriptResourceCacheManager.- Since:
- 6.2.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBEAN_NAMEBean name for script resource cache manager.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ScriptResourceCacheManager<K,V>clear()Clear items.voidclose()static java.lang.StringcomputeKey(java.lang.String... keys)Compute key.booleancontainsKey(K key)Contains key ?default voiddestroy()Vget(K key)Get item.java.util.Set<java.lang.String>getKeys()Gets keys.booleanisEmpty()Is cache empty?ScriptResourceCacheManager<K,V>put(K key, V value)Put script resource cache manager.ScriptResourceCacheManager<K,V>remove(K key)Remove script resource cache manager.ExecutableCompiledGroovyScriptresolveScriptableResource(java.lang.String scriptResource, java.lang.String... keys)Resolve scriptable resource executable.
-
-
-
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
-
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 keyvalue- 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:
closein interfacejava.lang.AutoCloseable
-
destroy
default void destroy()
- Specified by:
destroyin interfaceorg.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 resourcekeys- the keys- Returns:
- the executable compiled groovy script
-
-