01: /*
02: * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package com.tc.cluster;
06:
07: import java.util.EventListener;
08:
09: /**
10: * Listener for cluster events that occur when the cluster changes.
11: */
12: public interface ClusterEventListener extends EventListener {
13:
14: /**
15: * New node is connected to the cluster
16: * @param nodeId Id of new node
17: */
18: void nodeConnected(String nodeId);
19:
20: /**
21: * Node has left cluster
22: * @param nodeId Id of leaving node
23: */
24: void nodeDisconnected(String nodeId);
25:
26: /**
27: * Current node has disconnected from the cluster
28: * @param thisNodeId Current node Id
29: */
30: void this NodeDisconnected(String this NodeId);
31:
32: /**
33: * Current node has connected to the cluster
34: * @param thisNodeId Current node id
35: * @param nodesCurrentlyInCluster Nodes already in cluster on connect
36: */
37: void this NodeConnected(String this NodeId,
38: String[] nodesCurrentlyInCluster);
39: }
|