Package org.jppf.server.queue
Class JobDependenciesHandler
java.lang.Object
org.jppf.server.queue.JobDependenciesHandler
This class handles the interactions between the server queue and jobs and the job dependency graph.
- Author:
- Laurent Cohen
-
Constructor Summary
ConstructorsConstructorDescriptionCreate this dependency handler. -
Method Summary
Modifier and TypeMethodDescriptionorg.jppf.node.protocol.graph.MutableJobDependencyGraphgetGraph()booleanDetermine whether the specified job has any pending dependency.voidjobCancelled(ServerJob job) Called when a job with dependencies is cancelled.voidCalled when a job ends and is removed from the client or server queue.booleanCalled when a job with dependencies arrives in the client or server queue.
-
Constructor Details
-
JobDependenciesHandler
Create this dependency handler.- Parameters:
queue- the job queue.
-
-
Method Details
-
jobQueued
Called when a job with dependencies arrives in the client or server queue.- Parameters:
job- the job to processs.- Returns:
trueif the job should be cancelled,falseotherwise.
-
jobEnded
Called when a job ends and is removed from the client or server queue.- Parameters:
job- the job to process.
-
hasPendingDependencyOrCancelled
Determine whether the specified job has any pending dependency.- Parameters:
id- the dependency id of the job to check.- Returns:
trueif the job has at least one pendeing dependency,falseotherwise.
-
jobCancelled
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.
-