Class BuildLayers
- java.lang.Object
-
- eu.royalsloth.depbuilder.dsl.scheduling.BuildLayers
-
public class BuildLayers extends Object
-
-
Constructor Summary
Constructors Constructor Description BuildLayers(List<String> buildCycle)
Class constructor for layers that has build cycleBuildLayers(List<List<String>> buildLayers, List<ParsedBuildJob> parsedNodes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getBuildCycle()
BuildJob
getBuildNode(String node)
List<List<BuildJob>>
getLayers()
int
getNumberOfBuildNodes()
List<List<String>>
getOrderedBuildLayers()
Set<BuildJob>
getParents(BuildJob node)
boolean
hasCycle()
static BuildLayers
topologicalSort(List<ParsedBuildJob> buildNodes)
Sort build nodes with their specified dependencies into layers.
-
-
-
Method Detail
-
topologicalSort
public static BuildLayers topologicalSort(List<ParsedBuildJob> buildNodes)
Sort build nodes with their specified dependencies into layers. Each layer has to be processed before we can process another layer.- Parameters:
buildNodes
- nodes that will be sorted in correct build order- Returns:
- layers of dependencies
-
hasCycle
public boolean hasCycle()
-
getNumberOfBuildNodes
public int getNumberOfBuildNodes()
-
-