Record Class CentralOutcome
java.lang.Object
java.lang.Record
network.ike.plugin.release.central.CentralOutcome
- Record Components:
succeeded- whether the Central deploy completed successfully (sync path) or was successfully spawned (async path)attempts- number of attempts made (zero before the first try)asyncSpawned- whether the deploy was spawned as a detached subprocess (#484)sentinelPath- IPC sentinel file path whenasyncSpawnedis true, otherwisenulllogPath- log file the async subprocess streams to whenasyncSpawnedis true, otherwisenullskipReason- human-readable reason if the phase was skipped, ornullwhen not skippedfailureSummary- human-readable summary when the phase was attempted and exhausted retries, ornullwhen not failed
public record CentralOutcome(boolean succeeded, int attempts, boolean asyncSpawned, Path sentinelPath, Path logPath, String skipReason, String failureSummary)
extends Record
Outcome of the Maven Central deploy phase in the release pipeline.
Central deploys have two paths: a synchronous retry loop and a
detached async-bash spawn (IKE-Network/ike-issues#484). Both share
this outcome record. When the async path is taken,
asyncSpawned is true and sentinelPath +
logPath point to the IPC files that ike:central-status
reads to discover post-process completion.
Instances are immutable. Callers update state by constructing a
new instance via the with* helpers. initial()
returns the "did not run" state — appropriate for a draft preview
or a release aborted before the deploy phase.
Carved out of ReleaseDraftMojo during the Phase 4
decomposition (IKE-Network/ike-issues#489 P1) so that downstream
commits can replace mojo fields with phase-returned outcomes
without further reshaping.
-
Constructor Summary
ConstructorsConstructorDescriptionCentralOutcome(boolean succeeded, int attempts, boolean asyncSpawned, Path sentinelPath, Path logPath, String skipReason, String failureSummary) Creates an instance of aCentralOutcomerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theasyncSpawnedrecord component.intattempts()Returns the value of theattemptsrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefailureSummaryrecord component.final inthashCode()Returns a hash code value for this object.static CentralOutcomeinitial()Returns the initial outcome — not succeeded, zero attempts, no async spawn, no skip, no failure.logPath()Returns the value of thelogPathrecord component.Returns the value of thesentinelPathrecord component.Returns the value of theskipReasonrecord component.booleanReturns the value of thesucceededrecord component.final StringtoString()Returns a string representation of this record class.withAsyncSpawned(boolean asyncSpawned) Returns a copy of this outcome with theasyncSpawnedflag replaced.withAttempts(int attempts) Returns a copy of this outcome with the attempt count replaced.withFailureSummary(String failureSummary) Returns a copy of this outcome with the failure summary replaced.withLogPath(Path logPath) Returns a copy of this outcome with the log-file path replaced.withSentinelPath(Path sentinelPath) Returns a copy of this outcome with the sentinel-file path replaced.withSkipReason(String skipReason) Returns a copy of this outcome with the skip reason replaced.withSucceeded(boolean succeeded) Returns a copy of this outcome with the success flag replaced.
-
Constructor Details
-
CentralOutcome
public CentralOutcome(boolean succeeded, int attempts, boolean asyncSpawned, Path sentinelPath, Path logPath, String skipReason, String failureSummary) Creates an instance of aCentralOutcomerecord class.- Parameters:
succeeded- the value for thesucceededrecord componentattempts- the value for theattemptsrecord componentasyncSpawned- the value for theasyncSpawnedrecord componentsentinelPath- the value for thesentinelPathrecord componentlogPath- the value for thelogPathrecord componentskipReason- the value for theskipReasonrecord componentfailureSummary- the value for thefailureSummaryrecord component
-
-
Method Details
-
initial
Returns the initial outcome — not succeeded, zero attempts, no async spawn, no skip, no failure.- Returns:
- the initial
CentralOutcome
-
withAttempts
Returns a copy of this outcome with the attempt count replaced.- Parameters:
attempts- the new attempt count- Returns:
- a new
CentralOutcomewith the updated attempt count
-
withSucceeded
Returns a copy of this outcome with the success flag replaced.- Parameters:
succeeded- the new success flag- Returns:
- a new
CentralOutcomewith the updated success flag
-
withAsyncSpawned
Returns a copy of this outcome with theasyncSpawnedflag replaced.- Parameters:
asyncSpawned- the new async-spawn flag- Returns:
- a new
CentralOutcomewith the updated async-spawn flag
-
withSentinelPath
Returns a copy of this outcome with the sentinel-file path replaced.- Parameters:
sentinelPath- the new sentinel path, ornullto clear- Returns:
- a new
CentralOutcomewith the updated sentinel path
-
withLogPath
Returns a copy of this outcome with the log-file path replaced.- Parameters:
logPath- the new log path, ornullto clear- Returns:
- a new
CentralOutcomewith the updated log path
-
withSkipReason
Returns a copy of this outcome with the skip reason replaced.- Parameters:
skipReason- the new skip reason, ornullto clear- Returns:
- a new
CentralOutcomewith the updated skip reason
-
withFailureSummary
Returns a copy of this outcome with the failure summary replaced.- Parameters:
failureSummary- the new failure summary, ornullto clear- Returns:
- a new
CentralOutcomewith the updated failure summary
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
succeeded
-
attempts
-
asyncSpawned
public boolean asyncSpawned()Returns the value of theasyncSpawnedrecord component.- Returns:
- the value of the
asyncSpawnedrecord component
-
sentinelPath
Returns the value of thesentinelPathrecord component.- Returns:
- the value of the
sentinelPathrecord component
-
logPath
-
skipReason
Returns the value of theskipReasonrecord component.- Returns:
- the value of the
skipReasonrecord component
-
failureSummary
Returns the value of thefailureSummaryrecord component.- Returns:
- the value of the
failureSummaryrecord component
-