Package io.permazen.cli.jshell
Class PermazenExecutionControl
java.lang.Object
jdk.jshell.execution.DirectExecutionControl
jdk.jshell.execution.LocalExecutionControl
org.dellroad.jct.jshell.LocalContextExecutionControl
io.permazen.cli.jshell.PermazenExecutionControl
- All Implemented Interfaces:
AutoCloseable
,ExecutionControl
public class PermazenExecutionControl
extends org.dellroad.jct.jshell.LocalContextExecutionControl
Permazen-aware
LocalExecutionControl
.
When snippets are evaluated, the Permazen Session
obtained from PermazenJShellShellSession.getPermazenSession()
is used to create a transaction that stays open for the duration of the snippet execution and the subsequent formatting
of the returned result. In effect each JShell command executes within its own transaction, and the evaluated expressions
may directly access and manipulate database objects.
-
Nested Class Summary
Nested classes/interfaces inherited from interface jdk.jshell.spi.ExecutionControl
ExecutionControl.ClassBytecodes, ExecutionControl.ClassInstallException, ExecutionControl.EngineTerminationException, ExecutionControl.ExecutionControlException, ExecutionControl.InternalException, ExecutionControl.NotImplementedException, ExecutionControl.ResolutionException, ExecutionControl.RunException, ExecutionControl.StoppedException, ExecutionControl.UserException
-
Constructor Summary
-
Method Summary
Methods inherited from class org.dellroad.jct.jshell.LocalContextExecutionControl
decodeWithContext, invoke, invokeWithContext, invokeWrapper
Methods inherited from class jdk.jshell.execution.LocalExecutionControl
clientCodeEnter, clientCodeLeave, stop
Methods inherited from class jdk.jshell.execution.DirectExecutionControl
addToClasspath, classesRedefined, close, extensionCommand, findClass, invoke, load, redefine, throwConvertedInvocationException, throwConvertedOtherException, valueString, varValue
-
Constructor Details
-
PermazenExecutionControl
Constructor.- Parameters:
delegate
- loader delegate
-
-
Method Details
-
enterContext
protected void enterContext()- Overrides:
enterContext
in classorg.dellroad.jct.jshell.LocalContextExecutionControl
-
leaveContext
protected void leaveContext(boolean success) - Overrides:
leaveContext
in classorg.dellroad.jct.jshell.LocalContextExecutionControl
-