Package de.xima.fc.cluster.model
Interface ICluster
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
JGroupsCluster
Models a cluster with one or more nodes that can communicate with each over.
- Since:
- 3.1.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionvoid
changeLocaleNodeState
(ENodeState state) Changes the state of the local node, i.e. the node that corresponds to the server running this code.getID()
String[]
void
Attempts to send a message to other nodes in the cluster.
-
Method Details
-
getID
String getID()- Returns:
- The ID of the entire cluster.
-
getNodeList
- Returns:
- All nodes that are part of the cluster, whether or not they are currently connected.
-
getNodeIDs
String[] getNodeIDs()- Returns:
- A list of the IDs of all nodes that are part of the cluster, whether or not they are currently connected.
-
getLocaleNode
NodeModel getLocaleNode()- Returns:
- The local node, i.e. the node that corresponds to the server running this code.
-
sendMessage
Attempts to send a message to other nodes in the cluster.- Parameters:
msg
- Message to send to other nodes.- Throws:
Exception
- When the message could not be sent, such as due to network failures.
-
changeLocaleNodeState
Changes the state of the local node, i.e. the node that corresponds to the server running this code.- Parameters:
state
- The new state for the node.
-