org.apache.ignite.plugin.segmentation

## 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 by `IgniteConfiguration.DFLT_SEG_PLC` property.
  See Also:
    `SegmentationResolver`

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `NOOP` When segmentation policy is `NOOP`, all listeners will receive `EventType.EVT_NODE_SEGMENTED` event and it is up to user to implement logic to handle this event.
    `RESTART_JVM` When segmentation policy is `RESTART_JVM`, all listeners will receive `EventType.EVT_NODE_SEGMENTED` event and then JVM will be restarted.
    `STOP` When segmentation policy is `STOP`, all listeners will receive `EventType.EVT_NODE_SEGMENTED` event and then particular grid node will be stopped via call to `Ignition.stop(String, boolean)`.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and 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.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### RESTART_JVM

          public static final SegmentationPolicy RESTART_JVM

      When segmentation policy is `RESTART_JVM`, all listeners will receive `EventType.EVT_NODE_SEGMENTED` event and then JVM will be restarted. Note, that this will work only if Ignite is started with `CommandLineStartup` via standard `ignite.{sh|bat}` shell script.

    - #### STOP

          public static final SegmentationPolicy STOP

      When segmentation policy is `STOP`, all listeners will receive `EventType.EVT_NODE_SEGMENTED` event and then particular grid node will be stopped via call to `Ignition.stop(String, boolean)`.

    - #### NOOP

          public static final SegmentationPolicy NOOP

      When segmentation policy is `NOOP`, all listeners will receive `EventType.EVT_NODE_SEGMENTED` event and it is up to user to implement logic to handle this event.

  - ### 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 name
        `NullPointerException` - 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.

2020 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.9.1
Release Date | : December 9 2020