Record Class SagaTimeoutPolicy
java.lang.Object
java.lang.Record
org.j7m.middleware.api.saga.SagaTimeoutPolicy
- Record Components:
sagaTimeout- maximum duration for the entire saga executionstepTimeout- maximum duration for one running step
- All Implemented Interfaces:
Serializable
public record SagaTimeoutPolicy(Duration sagaTimeout, Duration stepTimeout)
extends Record
implements Serializable
Saga and step timeout policy.
Durations are interpreted by the saga implementation's deterministic clock. A zero duration disables the corresponding timeout.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSagaTimeoutPolicy(Duration sagaTimeout, Duration stepTimeout) Creates a validated timeout policy. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static SagaTimeoutPolicynone()Returns a policy with saga and step timeouts disabled.Returns the value of thesagaTimeoutrecord component.Returns the value of thestepTimeoutrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SagaTimeoutPolicy
-
-
Method Details
-
none
Returns a policy with saga and step timeouts disabled.- Returns:
- timeout policy with zero durations
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
sagaTimeout
Returns the value of thesagaTimeoutrecord component.- Returns:
- the value of the
sagaTimeoutrecord component
-
stepTimeout
Returns the value of thestepTimeoutrecord component.- Returns:
- the value of the
stepTimeoutrecord component
-