Package io.aeron.cluster
Enum Class ClusterBackup.State
- All Implemented Interfaces:
Serializable,Comparable<ClusterBackup.State>,Constable
- Enclosing class:
- ClusterBackup
State of the cluster backup state machine.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionBack up live log and track progress until next query deadline is reached.Query leader for current status for backup.The backup is complete and closed.Setup recording for live log.Replay the current live log since snapshot and join it.On error or progress stall the backup is reset and started over again.Retrieve a copy of the latest snapshot from the leader.Update the localRecordingLogfor recovery. -
Method Summary
Modifier and TypeMethodDescriptionintcode()Code which represents theClusterBackup.Stateas an int.static ClusterBackup.Stateget(long code) Get theClusterBackup.Statewith matchingcode().static ClusterBackup.Stateget(AtomicCounter counter) Get theClusterBackup.Stateencoded in anAtomicCounter.static ClusterBackup.StateReturns the enum constant of this class with the specified name.static ClusterBackup.State[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BACKUP_QUERY
Query leader for current status for backup. -
SNAPSHOT_RETRIEVE
Retrieve a copy of the latest snapshot from the leader. -
LIVE_LOG_RECORD
Setup recording for live log. -
LIVE_LOG_REPLAY
Replay the current live log since snapshot and join it. -
UPDATE_RECORDING_LOG
Update the localRecordingLogfor recovery. -
BACKING_UP
Back up live log and track progress until next query deadline is reached. -
RESET_BACKUP
On error or progress stall the backup is reset and started over again. -
CLOSED
The backup is complete and closed.
-
-
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
-
code
public int code()Code which represents theClusterBackup.Stateas an int.- Returns:
- code which represents the
ClusterBackup.Stateas an int.
-
get
Get theClusterBackup.Stateencoded in anAtomicCounter.- Parameters:
counter- to get the current state for.- Returns:
- the state for the
ClusterBackup. - Throws:
ClusterException- if the counter is not one of the valid values.
-
get
Get theClusterBackup.Statewith matchingcode().- Parameters:
code- to lookup.- Returns:
- the
ClusterBackup.Statematchingcode().
-