org.terracotta.toolkit.cluster
Enum ClusterEvent.Type

java.lang.Object
  extended by java.lang.Enum<ClusterEvent.Type>
      extended by org.terracotta.toolkit.cluster.ClusterEvent.Type
All Implemented Interfaces:
Serializable, Comparable<ClusterEvent.Type>
Enclosing interface:
ClusterEvent

public static enum ClusterEvent.Type
extends 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

NODE_JOINED

public static final ClusterEvent.Type NODE_JOINED
Sent when a node joined the cluster, including the current node.

This event happens once for the lifetime of a node.


NODE_LEFT

public static final ClusterEvent.Type NODE_LEFT
Sent when a node left the cluster, including the current node.

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.


OPERATIONS_ENABLED

public static final ClusterEvent.Type OPERATIONS_ENABLED
Sent when cluster operations are enabled on a node, any operations will go through and propagate through the cluster.

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.

See Also:
ClusterInfo.areOperationsEnabled()

OPERATIONS_DISABLED

public static final ClusterEvent.Type OPERATIONS_DISABLED
Sent when cluster operations are disabled on a node, no cluster operations can go through.

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.

See Also:
ClusterInfo.areOperationsEnabled()

NODE_REJOINED

public static final ClusterEvent.Type NODE_REJOINED
When a node rejoins the cluster. ClusterEvent.getNode() will return the new node id after rejoin. This event type is local and will be notified only in the current node.


NODE_ERROR

public static final ClusterEvent.Type NODE_ERROR
Event type representing an irrecoverable error in the current node. This event type is local and will be notified only in the current node.

Method Detail

values

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

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

valueOf

public static ClusterEvent.Type 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


Copyright © 2014 Terracotta, Inc.. All Rights Reserved.