StageGraphBuilder

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

public interface StageGraphBuilder

Functions

add
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)
@Nonnull()
abstract StageExecution add(Consumer<StageExecutioninit)
append
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 .

@Nonnull()
abstract StageExecution append(Consumer<StageExecutioninit)
build
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.

@Nonnull()
abstract Iterable<StageExecutionbuild()
connect
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 .

@Nonnull()
abstract StageExecution connect(StageExecution previous, Consumer<StageExecutioninit)