Class JobDependenciesHandler

java.lang.Object
org.jppf.server.queue.JobDependenciesHandler

public class JobDependenciesHandler extends Object
This class handles the interactions between the server queue and jobs and the job dependency graph.
Author:
Laurent Cohen
  • Constructor Details

    • JobDependenciesHandler

      public JobDependenciesHandler(JPPFPriorityQueue queue)
      Create this dependency handler.
      Parameters:
      queue - the job queue.
  • Method Details

    • jobQueued

      public boolean jobQueued(ServerJob job)
      Called when a job with dependencies arrives in the client or server queue.
      Parameters:
      job - the job to processs.
      Returns:
      true if the job should be cancelled, false otherwise.
    • jobEnded

      public void jobEnded(ServerJob job)
      Called when a job ends and is removed from the client or server queue.
      Parameters:
      job - the job to process.
    • hasPendingDependencyOrCancelled

      public boolean hasPendingDependencyOrCancelled(String id)
      Determine whether the specified job has any pending dependency.
      Parameters:
      id - the dependency id of the job to check.
      Returns:
      true if the job has at least one pendeing dependency, false otherwise.
    • jobCancelled

      public void jobCancelled(ServerJob job)
      Called when a job with dependencies is cancelled.
      Parameters:
      job - the job to processs.
    • getGraph

      public org.jppf.node.protocol.graph.MutableJobDependencyGraph getGraph()
      Returns:
      the dependency graph.