public static enum ClusterControl.ToggleState extends Enum<ClusterControl.ToggleState>
NEUTRAL and will be reset by the
ConsensusModule once the triggered action is complete.| Enum Constant and Description |
|---|
ABORT
Abort processing and terminate the cluster without taking a snapshot.
|
INACTIVE
Inactive state, not accepting new actions.
|
NEUTRAL
Neutral state ready to accept a new action.
|
RESUME
Resume processing of ingress and timers.
|
SHUTDOWN
Shut down the cluster in an orderly fashion by taking a snapshot first then terminating.
|
SNAPSHOT
Take a snapshot of cluster state.
|
STANDBY_SNAPSHOT
Trigger a snapshot that will only occur on a cluster standby.
|
SUSPEND
Suspend processing of ingress and timers.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
activate(AtomicCounter controlToggle)
Activate the toggle by setting it to the
NEUTRAL state. |
int |
code()
Code to be used as the indicator in the control toggle counter.
|
static void |
deactivate(AtomicCounter controlToggle)
Activate the toggle by setting it to the
INACTIVE state. |
static ClusterControl.ToggleState |
get(AtomicCounter controlToggle)
Get the
ClusterControl.ToggleState for a given control toggle. |
static void |
reset(AtomicCounter controlToggle)
Reset the toggle to the
NEUTRAL state. |
boolean |
toggle(AtomicCounter controlToggle)
Toggle the control counter to trigger the requested
ClusterControl.ToggleState. |
static ClusterControl.ToggleState |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ClusterControl.ToggleState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ClusterControl.ToggleState INACTIVE
public static final ClusterControl.ToggleState NEUTRAL
public static final ClusterControl.ToggleState SUSPEND
public static final ClusterControl.ToggleState RESUME
public static final ClusterControl.ToggleState SNAPSHOT
public static final ClusterControl.ToggleState SHUTDOWN
public static final ClusterControl.ToggleState ABORT
public static final ClusterControl.ToggleState STANDBY_SNAPSHOT
public static ClusterControl.ToggleState[] values()
for (ClusterControl.ToggleState c : ClusterControl.ToggleState.values()) System.out.println(c);
public static ClusterControl.ToggleState valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic final int code()
public final boolean toggle(AtomicCounter controlToggle)
ClusterControl.ToggleState.
This action is thread safe and will succeed if the toggle is in the NEUTRAL state,
or if toggle is SUSPEND and requested state is RESUME.
controlToggle - to change to the trigger state.NEUTRAL.public static void reset(AtomicCounter controlToggle)
NEUTRAL state.controlToggle - to be reset.public static void activate(AtomicCounter controlToggle)
NEUTRAL state.controlToggle - to be activated.public static void deactivate(AtomicCounter controlToggle)
INACTIVE state.controlToggle - to be deactivated.public static ClusterControl.ToggleState get(AtomicCounter controlToggle)
ClusterControl.ToggleState for a given control toggle.controlToggle - to get the current state for.ClusterException - if the counter is not one of the valid values.Copyright © 2014-2023 Real Logic Limited. All Rights Reserved.