Package org.jppf.node.protocol.graph
Interface JobDependencyGraph
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
JobDependencyGraphImpl,MutableJobDependencyGraph
A representation of the jobs dependencies graph. This is a directed acyclic graph.
- Author:
- Laurent Cohen
-
Method Summary
Modifier and TypeMethodDescriptionGet the ids of all the nodes currently in this graph.getDependedOn(String id) Get the nodes that depend on the node with the specified dependency id.Get the node for the specified dependency id.getNodeByJobUuid(String jobUuid) Get the node whose corresponding job has the specified uuid.Get the dependency ids of all the nodes currently in this graph.Get the nodes in the job dependency graph, whose corresponding job has arrived in the job queue.intgetSize()Get the size of this graph, that is, the number of nodes or vertices.booleanisEmpty()Determine whether this job dependency graph is empy.
-
Method Details
-
getNode
Get the node for the specified dependency id.- Parameters:
id- the id of the node to retrieve.- Returns:
- a
JobDependencyNodeinstance, ornullif 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
Get the dependency ids of all the nodes currently in this graph.- Returns:
- a Set of nodes ids, possibly empty.
-
getNodeByJobUuid
Get the node whose corresponding job has the specified uuid.- Parameters:
jobUuid- the id of job associated with the node to retrieve.- Returns:
- a
JobDependencyNodeinstance, ornullif no node as the specified job uuid.
-
getAllNodes
Collection<JobDependencyNode> 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
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
nullif there is no node with the specified id.
-
isEmpty
boolean isEmpty()Determine whether this job dependency graph is empy.- Returns:
trueif this graph is empty,falseotherwise.
-