Package io.debezium.embedded.async
Enum AsyncEmbeddedEngine.State
- All Implemented Interfaces:
Serializable,Comparable<AsyncEmbeddedEngine.State>
- Enclosing class:
- AsyncEmbeddedEngine<R>
Possible engine states.
Engine state must be changed only via
AsyncEmbeddedEngine.setEngineState(State, State) method.-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanGiven engine state, determines if engine can be stopped when it's in this state.static booleanGiven the engine state, determines if the connector tasks were already started and should be stopped.static AsyncEmbeddedEngine.StateReturns the enum constant of this type with the specified name.static AsyncEmbeddedEngine.State[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
CREATING
-
INITIALIZING
-
CREATING_TASKS
-
STARTING_TASKS
-
POLLING_TASKS
-
STOPPING
-
STOPPED
-
-
Constructor Details
-
State
private State()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
shouldStopTasks
Given the engine state, determines if the connector tasks were already started and should be stopped.- Parameters:
state- EngineAsyncEmbeddedEngine.Statewhen the shutdown was called.- Returns:
trueif connector tasks were already started,false otherwise.
-
canBeStopped
Given engine state, determines if engine can be stopped when it's in this state.- Parameters:
state- EngineAsyncEmbeddedEngine.Statefrom which engine shutdown is intended to be called.- Returns:
trueif engine can be stopped,falseotherwise.
-