Record Class ChoreographyEngine.ChoreographyResult
java.lang.Object
java.lang.Record
com.tnsai.coordination.choreography.ChoreographyEngine.ChoreographyResult
- Enclosing class:
ChoreographyEngine
public static record ChoreographyEngine.ChoreographyResult(boolean success, List<ChoreographyEngine.StepResult> stepResults, long totalDurationMs, int completedCount, int failedCount)
extends Record
Result of the entire choreography execution.
-
Constructor Summary
ConstructorsConstructorDescriptionChoreographyResult(boolean success, List<ChoreographyEngine.StepResult> stepResults, long totalDurationMs, int completedCount, int failedCount) Creates an instance of aChoreographyResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecompletedCountrecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefailedCountrecord component.final inthashCode()Returns a hash code value for this object.of(List<ChoreographyEngine.StepResult> results, long durationMs) Returns the value of thestepResultsrecord component.booleansuccess()Returns the value of thesuccessrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalDurationMsrecord component.
-
Constructor Details
-
ChoreographyResult
public ChoreographyResult(boolean success, List<ChoreographyEngine.StepResult> stepResults, long totalDurationMs, int completedCount, int failedCount) Creates an instance of aChoreographyResultrecord class.- Parameters:
success- the value for thesuccessrecord componentstepResults- the value for thestepResultsrecord componenttotalDurationMs- the value for thetotalDurationMsrecord componentcompletedCount- the value for thecompletedCountrecord componentfailedCount- the value for thefailedCountrecord component
-
-
Method Details
-
of
public static ChoreographyEngine.ChoreographyResult of(List<ChoreographyEngine.StepResult> results, long durationMs) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
success
public boolean success()Returns the value of thesuccessrecord component.- Returns:
- the value of the
successrecord component
-
stepResults
Returns the value of thestepResultsrecord component.- Returns:
- the value of the
stepResultsrecord component
-
totalDurationMs
public long totalDurationMs()Returns the value of thetotalDurationMsrecord component.- Returns:
- the value of the
totalDurationMsrecord component
-
completedCount
public int completedCount()Returns the value of thecompletedCountrecord component.- Returns:
- the value of the
completedCountrecord component
-
failedCount
public int failedCount()Returns the value of thefailedCountrecord component.- Returns:
- the value of the
failedCountrecord component
-