-
@Beta() public interface StageGraphBuilderProvides a low-level API for manipulating a stage DAG.
-
-
Method Summary
Modifier and Type Method Description abstract StageExecutionadd(Consumer<StageExecution> init)Adds a new stage to the graph. abstract voidadd(StageExecution stage)Adds a new stage to the graph. abstract StageExecutionconnect(StageExecution previous, Consumer<StageExecution> init)Adds a new stage to the graph and makes it depend on {@code previous}via its .abstract voidconnect(StageExecution previous, StageExecution next)Makes {@code next}depend on{@code previous}via its .abstract StageExecutionappend(Consumer<StageExecution> init)Adds a new stage to the graph and makes it depend on the last stage that was added if any. abstract voidappend(StageExecution stage)abstract Iterable<StageExecution>build()Builds and returns the stages represented in the graph. -
-
Method Detail
-
add
@Nonnull() abstract StageExecution add(Consumer<StageExecution> init)
Adds a new stage to the graph. By default the new stage is not dependent on any others. Use connect to make it depend on other stages or have other stages depend on it.
- Parameters:
init- builder for setting up the stage.
-
add
abstract void add(StageExecution stage)
Adds a new stage to the graph. By default the new stage is not dependent on any others. Use connect to make it depend on other stages or have other stages depend on it.
-
connect
@Nonnull() abstract StageExecution connect(StageExecution previous, Consumer<StageExecution> init)
- Parameters:
previous- The stage the new stage will depend on.init- See
-
connect
abstract void connect(StageExecution previous, StageExecution next)
-
append
@Nonnull() abstract StageExecution append(Consumer<StageExecution> init)
Adds a new stage to the graph and makes it depend on the last stage that was added if any.
This is convenient for straightforward stage graphs to avoid having to pass around references to stages in order to use .
If no stages have been added so far, this is synonymous with calling .
- Parameters:
init- See
-
append
abstract void append(StageExecution stage)
-
build
@Nonnull() abstract Iterable<StageExecution> build()
Builds and returns the stages represented in the graph. This method is not typically useful to implementors of StageDefinitionBuilder , it's used internally and by tests.
-
-
-
-