public interface StopWithSavepointTerminationHandler
StopWithSavepointTerminationHandler
handles the steps necessary for the
stop-with-savepoint operation to finish. The order of the operations matter:
Modifier and Type | Method and Description |
---|---|
CompletableFuture<String> |
getSavepointPath()
Returns the a
CompletableFuture referring to the result of the stop-with-savepoint
operation. |
void |
handleExecutionsTermination(Collection<ExecutionState> terminatedExecutionStates)
Handles the termination of the job based on the passed terminated
ExecutionStates . |
void |
handleSavepointCreation(CompletedCheckpoint completedSavepoint,
Throwable throwable)
Handles the result of a
CompletableFuture holding a CompletedCheckpoint . |
CompletableFuture<String> getSavepointPath()
CompletableFuture
referring to the result of the stop-with-savepoint
operation.CompletableFuture
containing the path to the created savepoint in case of
success.void handleSavepointCreation(@Nullable CompletedCheckpoint completedSavepoint, @Nullable Throwable throwable)
CompletableFuture
holding a CompletedCheckpoint
. Only
one of the two parameters are allowed to be set.completedSavepoint
- the CompletedCheckpoint
referring to the created savepointthrowable
- an error that was caught during savepoint creationIllegalArgumentException
- if throwable
and completedSavepoint
are setNullPointerException
- if none of the parameters is setvoid handleExecutionsTermination(Collection<ExecutionState> terminatedExecutionStates)
ExecutionStates
. stop-with-savepoint expects the terminatedExecutionStates
to only
contain ExecutionState.FINISHED
to succeed.terminatedExecutionStates
- The terminated ExecutionStates
of the underlying
job.NullPointerException
- if null
is passed.Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.