Package org.jppf.node.protocol.graph
Class TaskGraphInfo
java.lang.Object
org.jppf.node.protocol.graph.TaskGraphInfo
- All Implemented Interfaces:
Serializable
Information about the task graph, if any, for a job.
Instances of this class are intentded to be transported as part of the communication protocol between clients, servers and nodes.
- Author:
- Laurent Cohen
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTaskGraphInfo(int nbDependencies, CollectionMap<Integer, Integer> dependenciesMap, int[] dependenciesPositions) -
Method Summary
Modifier and TypeMethodDescriptionList<? extends PositionalElement<?>>int[]getDependencyAt(int position) Get the dependency at the specified position.intvoidsetDependencies(List<? extends PositionalElement<?>> dependencies) Set the actual dpeendencies, if available.
-
Constructor Details
-
TaskGraphInfo
public TaskGraphInfo(int nbDependencies, CollectionMap<Integer, Integer> dependenciesMap, int[] dependenciesPositions) - Parameters:
nbDependencies- the total number of dependencies for all the tasks.dependenciesMap- mapping of each task position to the positions of its dependencies.dependenciesPositions- an ordered set of positions of the dependencies.
-
-
Method Details
-
getNbDependencies
public int getNbDependencies()- Returns:
- the total number of dependencies for all the tasks.
-
getDependenciesMap
- Returns:
- a mapping of each task position to the positions of its dependencies.
-
getDependenciesPositions
public int[] getDependenciesPositions()- Returns:
- an ordered set of positions of the dependencies.
-
getDependencies
- Returns:
- the actual dpeendencies, if available.
-
setDependencies
Set the actual dpeendencies, if available.- Parameters:
dependencies- the dependencies to set.
-
getDependencyAt
Get the dependency at the specified position.- Parameters:
position- the position of the depe,de,cy tyo lookup.- Returns:
- a
PositionalElement, ornullif there is o dependency at the psecified position.
-