public class ChangeProcessStrategyFactory
extends java.lang.Object
This factory determines the optimal execution strategy by analyzing the target system's transactional capabilities and relationship to the audit store. The strategy selection ensures optimal consistency guarantees and performance characteristics for each scenario.
NonTxChangeProcessStrategyNonTxChangeProcessStrategySimpleTxChangeProcessStrategySharedTxChangeProcessStrategyThe factory uses a builder pattern to collect all necessary components before strategy creation, ensuring all dependencies are properly configured.
| Modifier and Type | Field and Description |
|---|---|
protected LifecycleAuditWriter |
auditWriter |
protected io.flamingock.internal.common.core.context.ContextResolver |
baseContext |
protected ExecutableChange |
change |
protected ExecutionContext |
executionContext |
protected Lock |
lock |
protected java.util.Set<java.lang.Class<?>> |
nonGuardedTypes |
| Constructor and Description |
|---|
ChangeProcessStrategyFactory(TargetSystemManager targetSystemManager) |
| Modifier and Type | Method and Description |
|---|---|
ChangeProcessStrategy |
build() |
static ChangeProcessStrategy |
getStrategy(ExecutableChange change,
TargetSystemOps targetSystemOps,
AuditStoreStepOperations auditStoreOps,
io.flamingock.internal.common.core.context.ContextResolver baseContext,
ExecutionContext executionContext,
ChangeResultBuilder resultBuilder,
LockGuardProxyFactory proxyFactory,
io.flamingock.internal.util.TimeService timeService)
Creates the appropriate change process strategy based on target system characteristics.
|
ChangeProcessStrategyFactory |
setAuditWriter(LifecycleAuditWriter auditWriter) |
ChangeProcessStrategyFactory |
setChange(ExecutableChange change) |
ChangeProcessStrategyFactory |
setDependencyContext(io.flamingock.internal.common.core.context.ContextResolver staticContext) |
ChangeProcessStrategyFactory |
setExecutionContext(ExecutionContext executionContext) |
ChangeProcessStrategyFactory |
setLock(Lock lock) |
ChangeProcessStrategyFactory |
setNonGuardedTypes(java.util.Set<java.lang.Class<?>> nonGuardedTypes) |
protected ExecutableChange change
protected LifecycleAuditWriter auditWriter
protected Lock lock
protected io.flamingock.internal.common.core.context.ContextResolver baseContext
protected java.util.Set<java.lang.Class<?>> nonGuardedTypes
protected ExecutionContext executionContext
public ChangeProcessStrategyFactory(TargetSystemManager targetSystemManager)
public ChangeProcessStrategyFactory setChange(ExecutableChange change)
public ChangeProcessStrategyFactory setAuditWriter(LifecycleAuditWriter auditWriter)
public ChangeProcessStrategyFactory setDependencyContext(io.flamingock.internal.common.core.context.ContextResolver staticContext)
public ChangeProcessStrategyFactory setNonGuardedTypes(java.util.Set<java.lang.Class<?>> nonGuardedTypes)
public ChangeProcessStrategyFactory setLock(Lock lock)
public ChangeProcessStrategyFactory setExecutionContext(ExecutionContext executionContext)
public ChangeProcessStrategy build()
public static ChangeProcessStrategy getStrategy(ExecutableChange change, TargetSystemOps targetSystemOps, AuditStoreStepOperations auditStoreOps, io.flamingock.internal.common.core.context.ContextResolver baseContext, ExecutionContext executionContext, ChangeResultBuilder resultBuilder, LockGuardProxyFactory proxyFactory, io.flamingock.internal.util.TimeService timeService)
Strategy selection considers both the change's transactional requirements and the target system's operation type to ensure optimal execution patterns.
change - The change to be appliedtargetSystemOps - Target system operations interfaceauditStoreOps - AuditStoreOperations interfacebaseContext - Base dependency resolution contextexecutionContext - Execution context for the changeresultBuilder - Change result builder for execution trackingproxyFactory - Lock guard proxy factory