@Deprecated static @Nonnull Stage newStage( @Nonnull Execution execution, @Nonnull String type, @Nullable String name, @Nonnull Map<String, Object> context, @Nullable Stage parent, @Nullable SyntheticStageOwner stageOwner ) { Stage stage = new Stage(execution, type, name, context); if (parent != null) { stage.setParentStageId(parent.getId()); } stage.setSyntheticStageOwner(stageOwner); return stage; }
/** * Adds a new stage to the graph. By default the new stage is not dependent on any * others. Use {@link #connect(Stage, Stage)} to make it depend on other stages or * have other stages depend on it. */ public void add(@Nonnull Stage stage) { stage.setExecution(parent.getExecution()); stage.setParentStageId(parent.getId()); stage.setSyntheticStageOwner(type); if (graph.addNode(stage)) { stage.setRefId(generateRefId()); } lastAdded = stage; }
stage.setSyntheticStageOwner(SyntheticStageOwner.valueOf(map.get(prefix + "syntheticStageOwner"))); stage.setParentStageId(map.get(prefix + "parentStageId"));