Class MutableJobDependencyGraph

java.lang.Object
org.jppf.node.protocol.graph.JobDependencyGraphImpl
org.jppf.node.protocol.graph.MutableJobDependencyGraph
All Implemented Interfaces:
Serializable, JobDependencyGraph

public class MutableJobDependencyGraph extends JobDependencyGraphImpl
A representation of the jobs dependencies graph. This is a directed acyclic graph.
Author:
Laurent Cohen
See Also:
  • Constructor Details

    • MutableJobDependencyGraph

      public MutableJobDependencyGraph()
      Default constructor.
  • Method Details

    • jobEnded

      public List<JobDependencyNode> jobEnded(String jobUuid)
      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

      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

      public void removeNode(String id)
      Remove the node with the specified id from this graph.
      Parameters:
      id - the id of the node to remove.
    • removeNode

      public void removeNode(JobDependencyNode node)
      Recursively remove the specified node and all its dependencies from this graph.
      Parameters:
      node - the node to remove.