Record Class NexusOutcome
java.lang.Object
java.lang.Record
network.ike.plugin.release.nexus.NexusOutcome
- Record Components:
succeeded- whether the Nexus deploy completed successfullyattempts- number of attempts made (zero before the first try)skipReason- human-readable reason if the phase was skipped, ornullwhen not skipped
Outcome of the Nexus deploy phase in the release pipeline.
Tracks attempt count, success state, and an optional skip reason
(non-null when the phase was deliberately bypassed via the
ike.skipNexusDeploy parameter or because credentials were
unavailable). Read by the post-deploy log and the release-report
renderer; not consumed downstream by the cascade itself.
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
ConstructorsConstructorDescriptionNexusOutcome(boolean succeeded, int attempts, String skipReason) Creates an instance of aNexusOutcomerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintattempts()Returns the value of theattemptsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static NexusOutcomeinitial()Returns the initial outcome — not succeeded, zero attempts, no skip reason.Returns the value of theskipReasonrecord component.booleanReturns the value of thesucceededrecord component.final StringtoString()Returns a string representation of this record class.withAttempts(int attempts) Returns a copy of this outcome with the attempt count 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
-
NexusOutcome
Creates an instance of aNexusOutcomerecord class.- Parameters:
succeeded- the value for thesucceededrecord componentattempts- the value for theattemptsrecord componentskipReason- the value for theskipReasonrecord component
-
-
Method Details
-
initial
Returns the initial outcome — not succeeded, zero attempts, no skip reason.- Returns:
- the initial
NexusOutcome
-
withAttempts
Returns a copy of this outcome with the attempt count replaced.- Parameters:
attempts- the new attempt count- Returns:
- a new
NexusOutcomewith 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
NexusOutcomewith the updated success flag
-
withSkipReason
Returns a copy of this outcome with the skip reason replaced.- Parameters:
skipReason- the new skip reason, ornullto clear- Returns:
- a new
NexusOutcomewith the updated skip reason
-
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
-
skipReason
Returns the value of theskipReasonrecord component.- Returns:
- the value of the
skipReasonrecord component
-