Provides a low-level API for manipulating a stage DAG.

public interface StageGraphBuilder


Link copied to clipboard

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.

abstract void add(StageExecution stage)
abstract StageExecution add(Consumer<StageExecutioninit)
Link copied to clipboard
abstract void append(StageExecution stage)

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 .

abstract StageExecution append(Consumer<StageExecutioninit)
Link copied to clipboard

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.

abstract Iterable<StageExecutionbuild()
Link copied to clipboard

Makes {@code next} depend on {@code previous} via its . If either {@code next} or {@code previous} are not yet present in the graph this method will add them.

abstract void connect(StageExecution previous, StageExecution next)

Adds a new stage to the graph and makes it depend on {@code previous} via its .

abstract StageExecution connect(StageExecution previous, Consumer<StageExecutioninit)