Class TopologyNode
java.lang.Object
org.jppf.client.monitoring.AbstractComponent<AbstractTopologyComponent>
org.jppf.client.monitoring.topology.AbstractTopologyComponent
org.jppf.client.monitoring.topology.TopologyNode
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
TopologyPeer
Implementation of
TopologyDriver for JPPF nodes.- Since:
- 5.0
- Author:
- Laurent Cohen
- See Also:
-
Field Summary
Fields inherited from class org.jppf.client.monitoring.topology.AbstractTopologyComponent
healthSnapshot, managementInfoFields inherited from class org.jppf.client.monitoring.AbstractComponent
children, parent, uuid -
Constructor Summary
ConstructorsConstructorDescriptionTopologyNode(org.jppf.management.JPPFManagementInfo nodeInformation) Initialize this topology data as holding information about a node. -
Method Summary
Modifier and TypeMethodDescriptionGet a user-friendly representation of this topology component.Convenience method to get the driver this node is attached to as aTopologyDriverinstance.Get the uuid of the node who this node is a slave of.intGet the number of slaves for a master node.org.jppf.management.JPPFNodeStateGet the object describing the current state of a node.org.jppf.management.NodePendingActionGet the currently pending action forthis node, if any.Get the status of the node.booleanisNode()This method always returnstrue.voidrefreshNodeState(org.jppf.management.JPPFNodeState newState) Refresh the state of the node represented by this topology data.voidsetNbSlaveNodes(int nbSlaveNodes) Set the number of slaves for a master node.voidsetStatus(TopologyNodeStatus status) Set the status of the node.toString()Methods inherited from class org.jppf.client.monitoring.topology.AbstractTopologyComponent
getHealthSnapshot, getManagementInfo, isDriver, isPeerMethods inherited from class org.jppf.client.monitoring.AbstractComponent
add, equals, getChild, getChildCount, getChildren, getParent, getUuid, hashCode, remove
-
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 returnstrue.- Overrides:
isNodein classAbstractTopologyComponent- Returns:
true.
-
getNodeState
public org.jppf.management.JPPFNodeState getNodeState()Get the object describing the current state of a node.- Returns:
- a
JPPFNodeStateinstance.
-
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
Get the status of the node.- Returns:
- the node status.
-
setStatus
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
Get the uuid of the node who this node is a slave of.- Returns:
- the uuid of this node's master node, or
nullif this node is not a slave. - Since:
- 6.0
-
toString
- Overrides:
toStringin classAbstractTopologyComponent
-
getPendingAction
public org.jppf.management.NodePendingAction getPendingAction()Get the currently pending action forthis node, if any.- Returns:
- the pending action as a
NodePendingActionenum element.
-
getDriver
Convenience method to get the driver this node is attached to as aTopologyDriverinstance.- Returns:
- a
TopologyDriverif this node is a real node, ornullif this is a peer server. - Since:
- 5.1
-
getDisplayName
Description copied from class:AbstractComponentGet a user-friendly representation of this topology component.- Overrides:
getDisplayNamein classAbstractComponent<AbstractTopologyComponent>- Returns:
- a displayable string representing this object.
-