Interface JobDependencyGraph

All Superinterfaces:
Serializable
All Known Implementing Classes:
JobDependencyGraphImpl, MutableJobDependencyGraph

public interface JobDependencyGraph extends Serializable
A representation of the jobs dependencies graph. This is a directed acyclic graph.
Author:
Laurent Cohen
  • Method Details

    • getNode

      Get the node for the specified dependency id.
      Parameters:
      id - the id of the node to retrieve.
      Returns:
      a JobDependencyNode instance, or null if no node has the specified id.
    • getSize

      int getSize()
      Get the size of this graph, that is, the number of nodes or vertices.
      Returns:
      the size of this graph, always >= 0.
    • getNodeIds

      Set<String> getNodeIds()
      Get the dependency ids of all the nodes currently in this graph.
      Returns:
      a Set of nodes ids, possibly empty.
    • getNodeByJobUuid

      JobDependencyNode getNodeByJobUuid(String jobUuid)
      Get the node whose corresponding job has the specified uuid.
      Parameters:
      jobUuid - the id of job associated with the node to retrieve.
      Returns:
      a JobDependencyNode instance, or null if no node as the specified job uuid.
    • getAllNodes

      Get the ids of all the nodes currently in this graph.
      Returns:
      a Set of nodes ids, possibly empty.
    • getQueuedNodes

      Collection<JobDependencyNode> getQueuedNodes()
      Get the nodes in the job dependency graph, whose corresponding job has arrived in the job queue.
      Returns:
      a Set of nodes ids, possibly empty.
    • getDependedOn

      Collection<JobDependencyNode> getDependedOn(String id)
      Get the nodes that depend on the node with the specified dependency id.
      Parameters:
      id - the id of the node whose dependents to find.
      Returns:
      a collection of nodes that dependen on the specified node, or null if there is no node with the specified id.
    • isEmpty

      boolean isEmpty()
      Determine whether this job dependency graph is empy.
      Returns:
      true if this graph is empty, false otherwise.