Enum SegmentationPolicy
- java.lang.Object
-
- java.lang.Enum<SegmentationPolicy>
-
- org.apache.ignite.plugin.segmentation.SegmentationPolicy
-
- All Implemented Interfaces:
Serializable
,Comparable<SegmentationPolicy>
public enum SegmentationPolicy extends Enum<SegmentationPolicy>
Policy that defines how node will react on topology segmentation. Note that default segmentation policy is defined byIgniteConfiguration.DFLT_SEG_PLC
property.- See Also:
SegmentationResolver
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NOOP
When segmentation policy isNOOP
, all listeners will receiveEventType.EVT_NODE_SEGMENTED
event and it is up to user to implement logic to handle this event.RESTART_JVM
When segmentation policy isRESTART_JVM
, all listeners will receiveEventType.EVT_NODE_SEGMENTED
event and then JVM will be restarted.STOP
When segmentation policy isSTOP
, all listeners will receiveEventType.EVT_NODE_SEGMENTED
event and then particular grid node will be stopped via call toIgnition.stop(String, boolean)
.USE_FAILURE_HANDLER
Use configured failure handler.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @Nullable SegmentationPolicy
fromOrdinal(int ord)
Efficiently gets enumerated value from its ordinal.static SegmentationPolicy
valueOf(String name)
Returns the enum constant of this type with the specified name.static SegmentationPolicy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
RESTART_JVM
public static final SegmentationPolicy RESTART_JVM
When segmentation policy isRESTART_JVM
, all listeners will receiveEventType.EVT_NODE_SEGMENTED
event and then JVM will be restarted. Note, that this will work only if Ignite is started withCommandLineStartup
via standardignite.{sh|bat}
shell script.
-
STOP
public static final SegmentationPolicy STOP
When segmentation policy isSTOP
, all listeners will receiveEventType.EVT_NODE_SEGMENTED
event and then particular grid node will be stopped via call toIgnition.stop(String, boolean)
.
-
NOOP
public static final SegmentationPolicy NOOP
When segmentation policy isNOOP
, all listeners will receiveEventType.EVT_NODE_SEGMENTED
event and it is up to user to implement logic to handle this event.
-
USE_FAILURE_HANDLER
public static final SegmentationPolicy USE_FAILURE_HANDLER
Use configured failure handler. It is default segmentation policy.
-
-
Method Detail
-
values
public static SegmentationPolicy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SegmentationPolicy c : SegmentationPolicy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SegmentationPolicy valueOf(String name)
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
-
fromOrdinal
@Nullable public static @Nullable SegmentationPolicy fromOrdinal(int ord)
Efficiently gets enumerated value from its ordinal.- Parameters:
ord
- Ordinal value.- Returns:
- Enumerated value or
null
if ordinal out of range.
-
-