GridGain™ 3.6.0e
Enterprise Edition

org.gridgain.grid.segmentation
Enum GridSegmentationPolicy

java.lang.Object
  extended by java.lang.Enum<GridSegmentationPolicy>
      extended by org.gridgain.grid.segmentation.GridSegmentationPolicy
All Implemented Interfaces:
Serializable, Comparable<GridSegmentationPolicy>

public enum GridSegmentationPolicy
extends Enum<GridSegmentationPolicy>

Policy that defines how node will react on topology segmentation.

Wiki & Forum:


Wiki
Forum

See Also:
GridSegmentationResolver
 

Enum Constant Summary
NOOP
          When segmentation policy is NOOP, all listeners will receive GridEventType.EVT_NODE_SEGMENTED event and it is up to user to a implement logic to handle this event.
RECONNECT
          When segmentation policy is RECONNECT, all listeners will receive GridEventType.EVT_NODE_SEGMENTED and then discovery manager will try to reconnect discovery SPI to topology (issuing GridEventType.EVT_NODE_RECONNECTED event on reconnect.
RESTART_JVM
          When segmentation policy is RESTART_JVM, all listeners will receive GridEventType.EVT_NODE_SEGMENTED event and then JVM will be restarted.
STOP
          When segmentation policy is STOP, all listeners will receive GridEventType.EVT_NODE_SEGMENTED event and then particular grid node will be stopped via call to GridFactory.stop(boolean, boolean).
 
Method Summary
static GridSegmentationPolicy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static GridSegmentationPolicy[] 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 GridSegmentationPolicy RESTART_JVM
When segmentation policy is RESTART_JVM, all listeners will receive GridEventType.EVT_NODE_SEGMENTED event and then JVM will be restarted. Note, that this will work only if GridGain is started with GridCommandLineLoader via standard ggstart.{sh|bat} shell script.


STOP

public static final GridSegmentationPolicy STOP
When segmentation policy is STOP, all listeners will receive GridEventType.EVT_NODE_SEGMENTED event and then particular grid node will be stopped via call to GridFactory.stop(boolean, boolean).


RECONNECT

public static final GridSegmentationPolicy RECONNECT
When segmentation policy is RECONNECT, all listeners will receive GridEventType.EVT_NODE_SEGMENTED and then discovery manager will try to reconnect discovery SPI to topology (issuing GridEventType.EVT_NODE_RECONNECTED event on reconnect.

Note, that this policy is not recommended when data grid is enabled.


NOOP

public static final GridSegmentationPolicy NOOP
When segmentation policy is NOOP, all listeners will receive GridEventType.EVT_NODE_SEGMENTED event and it is up to user to a implement logic to handle this event.

This policy is intended to use when it is needed to perform user-defined logic on node stop and then start.

Method Detail

values

public static GridSegmentationPolicy[] 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 (GridSegmentationPolicy c : GridSegmentationPolicy.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static GridSegmentationPolicy 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.)

Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null
Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name

GridGain™ 3.6.0e
Enterprise Edition

GridGain - Real Time Big Data
Enterprise Edition, ver. 3.6.0e.13012012
2012 Copyright © GridGain Systems
Follow us:   Follow GridGain on Github Follow GridGain on Facebook Join GridGain User Group Follow GridGain on Twitter Follow GridGain on YouTube