Package org.infinispan.scripting.impl
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 org.infinispan.scripting.ScriptingManager
SCRIPT_CACHE, SCRIPT_MANAGER_ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new named script.Retrieves the source code of an existing script.Retrieves names of all available scripts.voidremoveScript(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
-
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
-
getScriptNames
Description copied from interface:ScriptingManagerRetrieves names of all available scripts.- Specified by:
getScriptNamesin interfaceScriptingManager- Returns:
Set<String>containing names of available scripts.
-
runScript
Description copied from interface:ScriptingManagerRuns a named script- Specified by:
runScriptin interfaceScriptingManager- Parameters:
scriptName- 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
public <T> CompletionStage<T> runScript(String scriptName, org.infinispan.tasks.TaskContext context) Description copied from interface:ScriptingManagerRuns a named script using the specifiedTaskContext- Specified by:
runScriptin interfaceScriptingManager- Parameters:
scriptName- 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
-