public abstract class AbstractMigrationClientVersionState extends Object implements MigrationClientVersionState
MigrationClientVersionState
This class implements the template method pattern for enter(ClientVersion):
MigrationClientVersionState.clientVersion(),
creates or updates the DDB entry to reflect this state's versiondoEnter(ClientVersion) for state-specific initializationException handling: All exceptions thrown during DDB operations
(ProvisionedThroughputException, InvalidStateException, DependencyException)
are wrapped into DependencyException and thrown back to the caller. The caller
(either MigrationStateMachineImpl.initialize() which lets Scheduler retry, or
MigrationStateMachineImpl.enter() which retries indefinitely) handles the retry logic.
MigrationClientVersionInitState does NOT extend this class since it does not
write to DDB.
| Modifier and Type | Field and Description |
|---|---|
protected CoordinatorStateDAO |
coordinatorStateDAO |
protected MigrationState |
curentMigrationState |
protected boolean |
entered |
protected boolean |
left |
| Constructor and Description |
|---|
AbstractMigrationClientVersionState() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
doEnter(ClientVersion fromClientVersion)
State-specific enter logic.
|
void |
enter(ClientVersion fromClientVersion)
Template method that ensures DDB state matches this state's client version before
delegating to the state-specific
doEnter(ClientVersion) logic. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclientVersion, leaveprotected final MigrationState curentMigrationState
protected final CoordinatorStateDAO coordinatorStateDAO
protected boolean entered
protected boolean left
public final void enter(ClientVersion fromClientVersion) throws DependencyException
doEnter(ClientVersion) logic.
This method is idempotent — it only executes once per state instance.
enter in interface MigrationClientVersionStatefromClientVersion - the client version of the previous stateDependencyException - if DDB operations failprotected abstract void doEnter(ClientVersion fromClientVersion) throws DependencyException
fromClientVersion - the client version of the previous stateDependencyException - if state-specific initialization failsCopyright © 2026. All rights reserved.