Package org.jppf.node.protocol.graph
Class MutableJobDependencyGraph
java.lang.Object
org.jppf.node.protocol.graph.JobDependencyGraphImpl
org.jppf.node.protocol.graph.MutableJobDependencyGraph
- All Implemented Interfaces:
Serializable,JobDependencyGraph
A representation of the jobs dependencies graph. This is a directed acyclic graph.
- Author:
- Laurent Cohen
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddNode(JobDependencySpec spec, String jobUuid) Notify that the specified job has completed and update the dependencies graph accordingly.voidremoveNode(String id) Remove the node with the specified id from this graph.voidremoveNode(JobDependencyNode node) Recursively remove the specified node and all its dependencies from this graph.Methods inherited from class org.jppf.node.protocol.graph.JobDependencyGraphImpl
getAllNodes, getDependedOn, getNode, getNodeByJobUuid, getNodeIds, getQueuedNodes, getSize, isEmpty
-
Constructor Details
-
MutableJobDependencyGraph
public MutableJobDependencyGraph()Default constructor.
-
-
Method Details
-
jobEnded
Notify that the specified job has completed and update the dependencies graph accordingly.- Parameters:
jobUuid- the uuid of the job that has completed.- Returns:
- the list of jobs that no longer have any dependency and may thus be resumed.
-
addNode
public JobDependencyNode addNode(JobDependencySpec spec, String jobUuid) throws JPPFJobDependencyCycleException - Parameters:
spec- the dependencies specification for the job.jobUuid- the uuid of the associated jppf job.- Returns:
- the added
JobDependencyNode. - Throws:
JPPFJobDependencyCycleException- if a cycle is detected.
-
removeNode
Remove the node with the specified id from this graph.- Parameters:
id- the id of the node to remove.
-
removeNode
Recursively remove the specified node and all its dependencies from this graph.- Parameters:
node- the node to remove.
-