public static enum NodeControl.ToggleState extends Enum<NodeControl.ToggleState>
NEUTRAL and will be reset by the
ConsensusModule once the triggered action is complete.| Enum Constant and Description |
|---|
INACTIVE
Inactive state, not accepting new actions.
|
NEUTRAL
Neutral state ready to accept a new action.
|
REPLICATE_STANDBY_SNAPSHOT
Trigger a replication of the most resent standby snapshots.
|
| 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 NodeControl.ToggleState |
get(AtomicCounter controlToggle)
Get the
NodeControl.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
NodeControl.ToggleState. |
static NodeControl.ToggleState |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NodeControl.ToggleState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NodeControl.ToggleState INACTIVE
public static final NodeControl.ToggleState NEUTRAL
public static final NodeControl.ToggleState REPLICATE_STANDBY_SNAPSHOT
public static NodeControl.ToggleState[] values()
for (NodeControl.ToggleState c : NodeControl.ToggleState.values()) System.out.println(c);
public static NodeControl.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)
NodeControl.ToggleState.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 NodeControl.ToggleState get(AtomicCounter controlToggle)
NodeControl.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.