Package de.xima.fc.cluster.model
Interface ICluster
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
JGroupsCluster
public interface ICluster extends Serializable
Models a cluster with one or more nodes that can communicate with each over.- Since:
- 3.1.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
changeLocaleNodeState(ENodeState state)
Changes the state of the local node, i.e.String
getID()
NodeModel
getLocaleNode()
String[]
getNodeIDs()
List<NodeModel>
getNodeList()
void
sendMessage(IClusterMessage msg)
Attempts to send a message to other nodes in the cluster.
-
-
-
Method Detail
-
getID
String getID()
- Returns:
- The ID of the entire cluster.
-
getNodeList
List<NodeModel> 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
void sendMessage(IClusterMessage msg) throws Exception
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
void changeLocaleNodeState(ENodeState state)
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.
-
-