Class NodeModel

java.lang.Object
de.xima.fc.cluster.model.NodeModel
All Implemented Interfaces:
Serializable

public class NodeModel extends Object implements Serializable
Models a node that is part of a cluster.
Since:
3.1.0
Author:
XIMA MEDIA GmbH
See Also:
  • Constructor Details

    • NodeModel

      public NodeModel(String id, String address)
      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

      public String getID()
      Returns:
      The ID of this node.
    • getState

      public ENodeState getState()
      Returns:
      The current state of this node, e.g. whether this node is running, idle, or in failover mode.
    • setState

      public void setState(ENodeState state)
      Parameters:
      state - The current state of this node, e.g. whether this node is running, idle, or in failover mode.
    • getTimeStamp

      public Date getTimeStamp()
      Returns:
      The date when the node was added to the cluster.
    • setTimeStamp

      public void setTimeStamp(Date timeStamp)
      Parameters:
      timeStamp - The date when the node was added to the cluster.
    • getType

      public ENodeType getType()
      Returns:
      The type of this node, i.e. the role it performs in the cluster.
    • setType

      public void setType(ENodeType type)
      Parameters:
      type - The type of this node, i.e. the role it performs in the cluster.
    • getAddress

      public String getAddress()
      Returns:
      The current address (usually IP address) of this node.
    • setAddress

      public void setAddress(String adress)
      Parameters:
      adress - The current address (usually IP address) of this node.
    • toString

      public String toString()
      Overrides:
      toString in class Object