public interface ScriptCache
ScriptCache
service interface defines a cache for compiled scripts. Implementations of this interface should be thread-safe.Modifier and Type | Method and Description |
---|---|
void |
clear()
Empties the cache.
|
CachedScript |
getScript(String scriptPath)
Retrieves the
CachedScript corresponding to the script accessible from the scriptPath . |
void |
putScript(CachedScript script)
Stores a
CachedScript in the cache. |
boolean |
removeScript(String scriptPath)
Removes the script identified by
scriptPath from the cache. |
CachedScript getScript(String scriptPath)
CachedScript
corresponding to the script accessible from the scriptPath
.scriptPath
- the path from where the script can be accessedCachedScript
if one exists, null
otherwisevoid putScript(CachedScript script)
CachedScript
in the cache. If a previous version of it exist in the cache it is overridden.script
- the CachedScript
that should be stored in the cachevoid clear()
boolean removeScript(String scriptPath)
scriptPath
from the cache.scriptPath
- the path from where the script can be accessedtrue
if a script was cached from that path and was removed, false
otherwiseCopyright © 2017 The Apache Software Foundation. All rights reserved.