Package com.tnsai.reliability
Interface Outcome<T>
- Type Parameters:
T- the run's terminal output type
- All Known Implementing Classes:
Outcome.Aborted,Outcome.Completed,Outcome.Failed,Outcome.Suspended
public sealed interface Outcome<T>
permits Outcome.Completed<T>, Outcome.Failed<T>, Outcome.Aborted<T>, Outcome.Suspended<T>
Terminal result of a
ResumableRun.execute(I, com.tnsai.reliability.RunConfig) or
ResumableRun.resume(java.lang.String) call (TNS-299). Sealed so consumers can
pattern-match exhaustively on the four discrete shapes a run lifecycle
can resolve to: Outcome.Completed, Outcome.Failed, Outcome.Aborted,
Outcome.Suspended.
Outcome.Suspended is the unusual one. It's returned when the run
is cleanly paused (manual breakpoint, deliberate yield) rather than
aborted — the consumer can resume it later via the run's id, and the
subsequent ResumableRun.resume(java.lang.String) call picks up from the saved
checkpoint.
- Since:
- 0.10.0 (TNS-299)
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordOrchestrator policy stopped the run; cause is theAbortReason.static final recordRun finished its step list.static final recordA step threw and the orchestrator exhausted retries.static final recordRun yielded cleanly at a step boundary. -
Method Summary
-
Method Details
-
runId
String runId()Correlation id shared withCheckpoint.runId.
-