Package io.debezium.embedded.async
Enum Class AsyncEmbeddedEngine.State
- All Implemented Interfaces:
Serializable,Comparable<AsyncEmbeddedEngine.State>,Constable
- Enclosing class:
AsyncEmbeddedEngine<R>
Possible engine states.
Engine state must be changed only via
AsyncEmbeddedEngine.setEngineState(State, State) method.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
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 class with the specified name.static AsyncEmbeddedEngine.State[]values()Returns an array containing the constants of this enum class, 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 class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class 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.
-