public interface MigrationStateMachine
| Modifier and Type | Method and Description |
|---|---|
ClientVersion |
getCurrentClientVersion()
Get the ClientVersion of current state machine state.
|
void |
initialize()
Initialize the state machine by identifying the initial state when the KCL worker comes up for the first time.
|
void |
shutdown()
Shutdown state machine and perform necessary cleanup for the worker to gracefully shutdown
|
void |
terminate()
Terminate the state machine when it reaches a terminal state, which is a successful upgrade
to v3.x.
|
void |
transitionTo(ClientVersion nextClientVersion,
MigrationState state)
Peform transition from current state to the given new ClientVersion
|
void initialize()
throws DependencyException
DependencyException - When unable to identify the initial state.void shutdown()
void terminate()
void transitionTo(ClientVersion nextClientVersion, MigrationState state) throws InvalidStateException, DependencyException
nextClientVersion - clientVersion of the new state the state machine must transition tostate - the current MigrationState in dynamoInvalidStateException - when transition fails, this allows the state machine to stay
in the current state until a valid transition is possibleDependencyException - when transition fails due to dependency on DDB failing in
unexpected ways.ClientVersion getCurrentClientVersion()
Copyright © 2024. All rights reserved.