connect

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

Return

the newly created stage.

Parameters

init

See

previous

The stage the new stage will depend on. If {@code previous} does not already exist in the graph, this method will add it.

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

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)