Class UnixFSTransactionProgramInterpreter
java.lang.Object
dev.getelements.elements.rt.transact.unix.UnixFSTransactionProgramInterpreter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Implements the execution handlers. -
Method Summary
Modifier and TypeMethodDescriptionexecute
(UnixFSTransactionProgramExecutionPhase phase, UnixFSTransactionProgramInterpreter.ExecutionHandler executionHandler) Executes the program with the suppliedUnixFSTransactionProgramExecutionPhase
andUnixFSTransactionProgramInterpreter.ExecutionHandler
.executeCleanupPhase
(UnixFSTransactionProgramInterpreter.ExecutionHandler executionHandler) Executes the cleanup phase.executeCommitPhase
(UnixFSTransactionProgramInterpreter.ExecutionHandler executionHandler) Executes the commit phase.tryExecute
(UnixFSTransactionProgramExecutionPhase phase, UnixFSTransactionProgramInterpreter.ExecutionHandler executionHandler) Executes the program with the suppliedUnixFSTransactionProgramExecutionPhase
andUnixFSTransactionProgramInterpreter.ExecutionHandler
.tryExecuteCleanupPhase
(UnixFSTransactionProgramInterpreter.ExecutionHandler executionHandler) Executes the cleanup phase.tryExecuteCommitPhase
(UnixFSTransactionProgramInterpreter.ExecutionHandler executionHandler) Executes the commit phase.
-
Method Details
-
execute
public UnixFSTransactionProgramInterpreter execute(UnixFSTransactionProgramExecutionPhase phase, UnixFSTransactionProgramInterpreter.ExecutionHandler executionHandler) Executes the program with the suppliedUnixFSTransactionProgramExecutionPhase
andUnixFSTransactionProgramInterpreter.ExecutionHandler
. Throwing an exception if the phase isn't defined.- Parameters:
phase
- the phase to executeexecutionHandler
- the execution handler- Returns:
- this instance
-
tryExecute
public UnixFSTransactionProgramInterpreter tryExecute(UnixFSTransactionProgramExecutionPhase phase, UnixFSTransactionProgramInterpreter.ExecutionHandler executionHandler) Executes the program with the suppliedUnixFSTransactionProgramExecutionPhase
andUnixFSTransactionProgramInterpreter.ExecutionHandler
. Logging a debug message if the phase isn't defined.- Parameters:
phase
- the phase to executeexecutionHandler
- the execution handler- Returns:
- this instance
-
executeCommitPhase
public UnixFSTransactionProgramInterpreter executeCommitPhase(UnixFSTransactionProgramInterpreter.ExecutionHandler executionHandler) Executes the commit phase.- Parameters:
executionHandler
-
-
tryExecuteCommitPhase
public UnixFSTransactionProgramInterpreter tryExecuteCommitPhase(UnixFSTransactionProgramInterpreter.ExecutionHandler executionHandler) Executes the commit phase. If the phase is not defined, then this simply logs a message and skips the phase.- Parameters:
executionHandler
- theUnixFSTransactionProgramInterpreter.ExecutionHandler
to use
-
executeCleanupPhase
public UnixFSTransactionProgramInterpreter executeCleanupPhase(UnixFSTransactionProgramInterpreter.ExecutionHandler executionHandler) Executes the cleanup phase.- Parameters:
executionHandler
-
-
tryExecuteCleanupPhase
public UnixFSTransactionProgramInterpreter tryExecuteCleanupPhase(UnixFSTransactionProgramInterpreter.ExecutionHandler executionHandler) Executes the cleanup phase. If the phase is not defined, then this simply logs a message and skips the phase.- Parameters:
executionHandler
- theUnixFSTransactionProgramInterpreter.ExecutionHandler
to use
-