Class NodeModel

    • Constructor Detail

      • 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 Detail

      • 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.