|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<ClusterEvent.Type>
org.terracotta.toolkit.cluster.ClusterEvent.Type
public static enum ClusterEvent.Type
Enum Constant Summary | |
---|---|
NODE_ERROR
Event type representing an irrecoverable error in the current node. |
|
NODE_JOINED
Sent when a node joined the cluster, including the current node. |
|
NODE_LEFT
Sent when a node left the cluster, including the current node. |
|
NODE_REJOINED
When a node rejoins the cluster. |
|
OPERATIONS_DISABLED
Sent when cluster operations are disabled on a node, no cluster operations can go through. |
|
OPERATIONS_ENABLED
Sent when cluster operations are enabled on a node, any operations will go through and propagate through the cluster. |
Method Summary | |
---|---|
static ClusterEvent.Type |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static ClusterEvent.Type[] |
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 |
---|
public static final ClusterEvent.Type NODE_JOINED
This event happens once for the lifetime of a node.
public static final ClusterEvent.Type NODE_LEFT
This event happens once for the lifetime of a node.
Note that this event might never be triggered for the node in question, other nodes in the cluster will however always receive this event about nodes that have permanently left the cluster.
public static final ClusterEvent.Type OPERATIONS_ENABLED
This event can be repeated as many times as appropriate, but you're guaranteed to have always received a
node joined
or operations disabled
event before.
Only the current node will receive events concerning its own cluster operations.
ClusterInfo.areOperationsEnabled()
public static final ClusterEvent.Type OPERATIONS_DISABLED
They might propagate through the cluster if the operations are enabled again afterwards, however it's also possible that the nodes is forced to leave the cluster instead.
This event can be repeated as many times as appropriate, but you're guaranteed to have always received an
operations enabled
event before.
Only the current node will receive events concerning its own cluster operations.
ClusterInfo.areOperationsEnabled()
public static final ClusterEvent.Type NODE_REJOINED
ClusterEvent.getNode()
will return the new node id after rejoin. This
event type is local and will be notified only in the current node.
public static final ClusterEvent.Type NODE_ERROR
Method Detail |
---|
public static ClusterEvent.Type[] values()
for (ClusterEvent.Type c : ClusterEvent.Type.values()) System.out.println(c);
public static ClusterEvent.Type valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |