Code using a graph instance may assume that it is well formed - that is, the nodes are linked to each other in a consistent fashion and no cycles are present. It is the responsibility of code that creates (or modifies) graphs to ensure that invalid graphs are not produced as the presence of such a graph would break other components.
The "master" data of dependencies are owned/persisted/maintained by individual {@link AbstractProject}s, but because of that, it's relatively slow to compute backward edges.
This class builds the complete bi-directional dependency graph by collecting information from all {@link AbstractProject}s.
Once built, {@link DependencyGraph} is immutable, and every timethere's a change (which is relatively rare), a new instance will be created. This eliminates the need of synchronization. @see Jenkins#getDependencyGraph() @author Kohsuke Kawaguchi
There are four types of dependency that may exist from one {@link ICompilationUnit} to another {@link ICompilationUnit}.
The code in this class intends to make adding or updating a dependency edge very fast and thread safe.
|
|
|
|
|
|
|
|
|
|