public interface TransactionalTargetSystemOps extends TargetSystemOps, TargetSystemAuditMarker
Extends TargetSystemOps to add transactional change execution
and audit marking capabilities. This interface is used by the execution
engine when processing changes marked as transactional.
Implementations typically wrap a TransactionalTargetSystem
instance and delegate operations to it.
| Modifier and Type | Method and Description |
|---|---|
<T> T |
applyChangeTransactional(java.util.function.Function<ExecutionRuntime,T> changeApplier,
ExecutionRuntime executionRuntime)
Applies a change operation within a transaction.
|
java.util.Optional<io.flamingock.internal.common.core.audit.AuditHistoryReader> |
getAuditAuditReader(io.flamingock.internal.common.core.audit.AuditReaderType type)
Returns an audit history reader for importing audit entries from external migration sources.
|
applyChange, getOperationType, rollbackChangeclearMark, listAll, mark, markApplied<T> T applyChangeTransactional(java.util.function.Function<ExecutionRuntime,T> changeApplier, ExecutionRuntime executionRuntime)
This method coordinates transactional execution by:
T - the return type of the change operationchangeApplier - the function that executes the actual changeexecutionRuntime - the runtime context for dependency resolutionjava.lang.RuntimeException - if the transaction failsjava.util.Optional<io.flamingock.internal.common.core.audit.AuditHistoryReader> getAuditAuditReader(io.flamingock.internal.common.core.audit.AuditReaderType type)
This method enables Flamingock to import audit history from legacy migration tools or other Flamingock installations, preventing re-execution of already-applied changes. The returned reader provides access to historical audit entries that can be written to Flamingock's audit store.
Common use cases include:
The default implementation returns Optional.empty(), indicating no audit reader is available.
Target system implementations should override this method to provide database-specific readers when
migration support is needed.
type - the type of audit reader to retrieve (e.g., AuditReaderType.MONGOCK)Optional containing the audit history reader if supported for the given type,
or Optional.empty() if this target system does not support audit reading for the specified typeAuditHistoryReader,
AuditReaderType