Record Class FeatureStepState
java.lang.Object
java.lang.Record
app.ductape.sdk.features.executor.state.FeatureStepState
public record FeatureStepState(String tag, StepKind kind, StepStatus status, long startedAt, long completedAt, Object output, String error, int attempts)
extends Record
Sprint 4 — TS-shaped runtime state for a single feature step.
-
Constructor Summary
ConstructorsConstructorDescriptionFeatureStepState(String tag, StepKind kind, StepStatus status, long startedAt, long completedAt, Object output, String error, int attempts) Creates an instance of aFeatureStepStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionintattempts()Returns the value of theattemptsrecord component.longReturns the value of thecompletedAtrecord component.final booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.output()Returns the value of theoutputrecord component.static FeatureStepStaterunning(long now, int attempt) longReturns the value of thestartedAtrecord component.status()Returns the value of thestatusrecord component.tag()Returns the value of thetagrecord component.toMap()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FeatureStepState
public FeatureStepState(String tag, StepKind kind, StepStatus status, long startedAt, long completedAt, Object output, String error, int attempts) Creates an instance of aFeatureStepStaterecord class.- Parameters:
tag- the value for thetagrecord componentkind- the value for thekindrecord componentstatus- the value for thestatusrecord componentstartedAt- the value for thestartedAtrecord componentcompletedAt- the value for thecompletedAtrecord componentoutput- the value for theoutputrecord componenterror- the value for theerrorrecord componentattempts- the value for theattemptsrecord component
-
-
Method Details
-
pending
-
running
-
completed
-
failed
-
toMap
-
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 '=='. -
tag
Returns the value of thetagrecord component.- Returns:
- the value of the
tagrecord component
-
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
startedAt
public long startedAt()Returns the value of thestartedAtrecord component.- Returns:
- the value of the
startedAtrecord component
-
completedAt
public long completedAt()Returns the value of thecompletedAtrecord component.- Returns:
- the value of the
completedAtrecord component
-
output
Returns the value of theoutputrecord component.- Returns:
- the value of the
outputrecord component
-
error
Returns the value of theerrorrecord component.- Returns:
- the value of the
errorrecord component
-
attempts
public int attempts()Returns the value of theattemptsrecord component.- Returns:
- the value of the
attemptsrecord component
-