Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -317,14 +317,6 @@ public Iterable<BlockStartNode> iterateEnclosingBlocks(@NonNull FlowNode node) {
return getInternalGraphLookup().iterateEnclosingBlocks(node);
}

/**
* @deprecated No longer used.
*/
@Deprecated
protected void notifyShutdown() {
// Default is no-op
}

/**
* Called after a restart and any attempts at {@link StepExecution#onResume} have completed.
* This is a signal that it is safe to resume program execution.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,19 +279,9 @@ public ListenableFuture<?> apply(final Function<StepExecution, Void> f) {
}

@Restricted(DoNotUse.class)
@SuppressWarnings("deprecation")
@Terminator(requires = EXECUTIONS_SUSPENDED, attains = LIST_SAVED)
public static void saveAll() throws InterruptedException {
LOGGER.fine("ensuring all executions are saved");

for (FlowExecutionOwner owner : get().runningTasks.getView()) {
try {
owner.notifyShutdown();
} catch (Exception ex) {
LOGGER.log(Level.WARNING, "Error shutting down task", ex);
}
}

SingleLaneExecutorService executor = get().executor;
executor.shutdown();
executor.awaitTermination(1, TimeUnit.MINUTES);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,6 @@ public abstract class FlowExecutionOwner implements Serializable {
@NonNull
public abstract FlowExecution get() throws IOException;

/**
* @deprecated No longer used.
*/
@Deprecated
void notifyShutdown() {
FlowExecution exec = getOrNull();
if (exec != null) {
exec.notifyShutdown();
}
}

/**
* Same as {@link #get} but avoids throwing an exception or blocking.
* @return a valid flow execution, or null if not ready or invalid
Expand Down
Loading