Class TopologyNode

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
TopologyPeer

public class TopologyNode extends AbstractTopologyComponent
Implementation of TopologyDriver for JPPF nodes.
Since:
5.0
Author:
Laurent Cohen
See Also:
  • Constructor Details

    • TopologyNode

      public TopologyNode(org.jppf.management.JPPFManagementInfo nodeInformation)
      Initialize this topology data as holding information about a node.
      Parameters:
      nodeInformation - information on the JPPF node.
  • Method Details

    • isNode

      public boolean isNode()
      This method always returns true.
      Overrides:
      isNode in class AbstractTopologyComponent
      Returns:
      true.
    • getNodeState

      public org.jppf.management.JPPFNodeState getNodeState()
      Get the object describing the current state of a node.
      Returns:
      a JPPFNodeState instance.
    • refreshNodeState

      public void refreshNodeState(org.jppf.management.JPPFNodeState newState)
      Refresh the state of the node represented by this topology data.
      Parameters:
      newState - the new node state fetched from the grid.
    • getStatus

      public TopologyNodeStatus getStatus()
      Get the status of the node.
      Returns:
      the node status.
    • setStatus

      public void setStatus(TopologyNodeStatus status)
      Set the status of the node.
      Parameters:
      status - the node status.
    • getNbSlaveNodes

      public int getNbSlaveNodes()
      Get the number of slaves for a master node.
      Returns:
      the number of slaves as an int.
    • setNbSlaveNodes

      public void setNbSlaveNodes(int nbSlaveNodes)
      Set the number of slaves for a master node.
      Parameters:
      nbSlaveNodes - the number of slaves as an int.
    • getMasterUuid

      public String getMasterUuid()
      Get the uuid of the node who this node is a slave of.
      Returns:
      the uuid of this node's master node, or null if this node is not a slave.
      Since:
      6.0
    • toString

      public String toString()
      Overrides:
      toString in class AbstractTopologyComponent
    • getPendingAction

      public org.jppf.management.NodePendingAction getPendingAction()
      Get the currently pending action forthis node, if any.
      Returns:
      the pending action as a NodePendingAction enum element.
    • getDriver

      public TopologyDriver getDriver()
      Convenience method to get the driver this node is attached to as a TopologyDriver instance.
      Returns:
      a TopologyDriver if this node is a real node, or null if this is a peer server.
      Since:
      5.1
    • getDisplayName

      public String getDisplayName()
      Description copied from class: AbstractComponent
      Get a user-friendly representation of this topology component.
      Overrides:
      getDisplayName in class AbstractComponent<AbstractTopologyComponent>
      Returns:
      a displayable string representing this object.