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.

  • Constructor Details

    • PermazenExecutionControl

      public PermazenExecutionControl(LoaderDelegate delegate)
      Constructor.
      Parameters:
      delegate - loader delegate
  • Method Details

    • enterContext

      protected void enterContext()
      Overrides:
      enterContext in class org.dellroad.jct.jshell.LocalContextExecutionControl
    • leaveContext

      protected void leaveContext(boolean success)
      Overrides:
      leaveContext in class org.dellroad.jct.jshell.LocalContextExecutionControl