Package de.xima.fc.cluster.model
Class NodeModel
java.lang.Object
de.xima.fc.cluster.model.NodeModel
- All Implemented Interfaces:
Serializable
Models a node that is part of a cluster.
- Since:
- 3.1.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetID()
getState()
getType()
void
setAddress
(String adress) void
setState
(ENodeState state) void
setTimeStamp
(Date timeStamp) void
toString()
-
Constructor Details
-
NodeModel
Creates a new model for a node in the cluster with the given initial data.- Parameters:
id
- ID of the node that cannot be changed.address
- Address of the node.
-
-
Method Details
-
getID
- Returns:
- The ID of this node.
-
getState
- Returns:
- The current state of this node, e.g. whether this node is running, idle, or in failover mode.
-
setState
- Parameters:
state
- The current state of this node, e.g. whether this node is running, idle, or in failover mode.
-
getTimeStamp
- Returns:
- The date when the node was added to the cluster.
-
setTimeStamp
- Parameters:
timeStamp
- The date when the node was added to the cluster.
-
getType
- Returns:
- The type of this node, i.e. the role it performs in the cluster.
-
setType
- Parameters:
type
- The type of this node, i.e. the role it performs in the cluster.
-
getAddress
- Returns:
- The current address (usually IP address) of this node.
-
setAddress
- Parameters:
adress
- The current address (usually IP address) of this node.
-
toString
-