Record Class RetryDecision
java.lang.Object
java.lang.Record
org.j7m.middleware.api.messaging.RetryDecision
- Record Components:
retry- whether to retrydeadLetter- whether to dead-letternotBefore- earliest retry timesafeReason- safe redacted reason
- All Implemented Interfaces:
Serializable
public record RetryDecision(boolean retry, boolean deadLetter, Instant notBefore, String safeReason)
extends Record
implements Serializable
Retry/dead-letter decision.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRetryDecision(boolean retry, boolean deadLetter, Instant notBefore, String safeReason) Creates retry decision. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thedeadLetterrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thenotBeforerecord component.booleanretry()Returns the value of theretryrecord component.Returns the value of thesafeReasonrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RetryDecision
-
-
Method Details
-
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. -
retry
-
deadLetter
public boolean deadLetter()Returns the value of thedeadLetterrecord component.- Returns:
- the value of the
deadLetterrecord component
-
notBefore
-
safeReason
Returns the value of thesafeReasonrecord component.- Returns:
- the value of the
safeReasonrecord component
-