Class TaskGraphInfo

java.lang.Object
org.jppf.node.protocol.graph.TaskGraphInfo
All Implemented Interfaces:
Serializable

public class TaskGraphInfo extends Object implements 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 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

      public CollectionMap<Integer,Integer> 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

      public List<? extends PositionalElement<?>> getDependencies()
      Returns:
      the actual dpeendencies, if available.
    • setDependencies

      public void setDependencies(List<? extends PositionalElement<?>> dependencies)
      Set the actual dpeendencies, if available.
      Parameters:
      dependencies - the dependencies to set.
    • getDependencyAt

      public PositionalElement<?> getDependencyAt(int position)
      Get the dependency at the specified position.
      Parameters:
      position - the position of the depe,de,cy tyo lookup.
      Returns:
      a PositionalElement, or null if there is o dependency at the psecified position.