Class ScriptingManagerImpl
java.lang.Object
org.infinispan.scripting.impl.ScriptingManagerImpl
- All Implemented Interfaces:
ScriptingManager
ScriptingManagerImpl.
- Since:
- 7.2
- Author:
- Tristan Tarrant
-
Field Summary
Fields inherited from interface ScriptingManager
SCRIPT_CACHE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new named script.voidaddScript(String name, String script, ScriptMetadata metadata) Adds a new named script with user-specified metadatabooleancontainsScript(String name) Returns whether a script existsRetrieves the source code of an existing script.Retrieves names of all available scripts.getScriptWithMetadata(String name) Retrieves the source code of an existing script together with its metadatavoidremoveScript(String name) Removes a script.<T> CompletionStage<T> Runs a named script<T> CompletionStage<T> Runs a named script using the specifiedTaskContextvoidstart()
-
Constructor Details
-
ScriptingManagerImpl
public ScriptingManagerImpl()
-
-
Method Details
-
start
public void start() -
addScript
Description copied from interface:ScriptingManagerAdds a new named script.- Specified by:
addScriptin interfaceScriptingManager- Parameters:
name- the name of the script. The name should contain an extension identifying its languagescript- the source of the script
-
addScript
Description copied from interface:ScriptingManagerAdds a new named script with user-specified metadata- Specified by:
addScriptin interfaceScriptingManager- Parameters:
name- the name of the script. The name should contain an extension identifying its languagescript- the source of the scriptmetadata- the metadata for the script
-
removeScript
Description copied from interface:ScriptingManagerRemoves a script.- Specified by:
removeScriptin interfaceScriptingManager- Parameters:
name- the name of the script ro remove
-
getScript
Description copied from interface:ScriptingManagerRetrieves the source code of an existing script.- Specified by:
getScriptin interfaceScriptingManager- Parameters:
name- The name of the script- Returns:
- the source code of the script
-
getScriptWithMetadata
Description copied from interface:ScriptingManagerRetrieves the source code of an existing script together with its metadata- Specified by:
getScriptWithMetadatain interfaceScriptingManager- Parameters:
name- The name of the script- Returns:
- the source code of the script
-
getScriptNames
Description copied from interface:ScriptingManagerRetrieves names of all available scripts.- Specified by:
getScriptNamesin interfaceScriptingManager- Returns:
Set<String>containing names of available scripts.
-
containsScript
Description copied from interface:ScriptingManagerReturns whether a script exists- Specified by:
containsScriptin interfaceScriptingManager- Parameters:
name- the name of the script- Returns:
- a boolean indicating script existence
-
runScript
Description copied from interface:ScriptingManagerRuns a named script- Specified by:
runScriptin interfaceScriptingManager- Parameters:
name- The name of the script to run. UseScriptingManager.addScript(String, String)to add a script- Returns:
- a
CompletableFuturewhich will return the result of the script execution
-
runScript
Description copied from interface:ScriptingManagerRuns a named script using the specifiedTaskContext- Specified by:
runScriptin interfaceScriptingManager- Parameters:
name- The name of the script to run. UseScriptingManager.addScript(String, String)to add a scriptcontext- ATaskContextwithin which the script will be executed- Returns:
- a
CompletableFuturewhich will return the result of the script execution
-