TS_OPS - The type of target system operations supported by this strategypublic abstract class AbstractChangeProcessStrategy<TS_OPS extends TargetSystemOps> extends java.lang.Object implements ChangeProcessStrategy
This class provides the foundational infrastructure for executing changes across different target system types while maintaining consistent audit trails and execution results. Concrete implementations define the specific transaction handling and execution flow patterns appropriate for their target system characteristics.
All strategies use consistent audit operations provided by this base class:
auditAndLogStartExecution - Records change initiationauditAndLogExecution - Records execution resultsauditAndLogManualRollback - Records manual rollback operationsauditAndLogAutoRollback - Records automatic transaction rollbacksThe execution runtime provides dependency injection and security context for change execution, ensuring changes have access to required dependencies while maintaining proper lock management.
| Modifier and Type | Field and Description |
|---|---|
protected AuditStoreStepOperations |
auditStoreOperations |
protected ExecutableTask |
change |
protected ExecutionContext |
executionContext |
protected ChangeResultBuilder |
resultBuilder |
protected static ChangeProcessLogger |
stepLogger |
protected TS_OPS |
targetSystemOps |
protected io.flamingock.internal.util.TimeService |
timeService |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractChangeProcessStrategy(ExecutableTask change,
ExecutionContext executionContext,
TS_OPS targetSystemOps,
AuditStoreStepOperations auditStoreOperations,
ChangeResultBuilder resultBuilder,
LockGuardProxyFactory proxyFactory,
io.flamingock.internal.common.core.context.ContextResolver baseContext,
io.flamingock.internal.util.TimeService timeService) |
| Modifier and Type | Method and Description |
|---|---|
ChangeProcessResult |
applyChange()
Applies the change and returns the result.
|
protected void |
auditAndLogAutoRollback(CompleteAutoRolledBackStep rolledBackStep,
ExecutionContext executionContext) |
protected AfterExecutionAuditStep |
auditAndLogExecution(ExecutionStep executionStep)
Audits and logs the execution result of a change.
|
protected void |
auditAndLogManualRollback(ManualRolledBackStep rolledBackStep,
ExecutionContext executionContext) |
protected ExecutableStep |
auditAndLogStartExecution(StartStep startStep,
ExecutionContext executionContext)
Audits and logs the start of change execution.
|
protected ExecutionRuntime |
buildExecutionRuntime()
Builds the execution runtime for change execution.
|
protected abstract ChangeProcessResult |
doApplyChange()
Strategy-specific implementation of change application.
|
protected static final ChangeProcessLogger stepLogger
protected final ExecutableTask change
protected final TS_OPS extends TargetSystemOps targetSystemOps
protected final ExecutionContext executionContext
protected final ChangeResultBuilder resultBuilder
protected final AuditStoreStepOperations auditStoreOperations
protected final io.flamingock.internal.util.TimeService timeService
protected AbstractChangeProcessStrategy(ExecutableTask change, ExecutionContext executionContext, TS_OPS targetSystemOps, AuditStoreStepOperations auditStoreOperations, ChangeResultBuilder resultBuilder, LockGuardProxyFactory proxyFactory, io.flamingock.internal.common.core.context.ContextResolver baseContext, io.flamingock.internal.util.TimeService timeService)
public final ChangeProcessResult applyChange()
ChangeProcessStrategyapplyChange in interface ChangeProcessStrategyprotected abstract ChangeProcessResult doApplyChange()
Concrete strategies must implement this method to define their specific transaction handling, execution flow, and error recovery patterns.
protected ExecutableStep auditAndLogStartExecution(StartStep startStep, ExecutionContext executionContext)
startStep - The initial step for the changeexecutionContext - The execution contextprotected AfterExecutionAuditStep auditAndLogExecution(ExecutionStep executionStep)
executionStep - The execution step with resultsprotected void auditAndLogManualRollback(ManualRolledBackStep rolledBackStep, ExecutionContext executionContext)
protected void auditAndLogAutoRollback(CompleteAutoRolledBackStep rolledBackStep, ExecutionContext executionContext)
protected ExecutionRuntime buildExecutionRuntime()
The runtime provides dependency injection context and security proxies needed for safe change execution with proper lock management.