Record Class NackOptions
java.lang.Object
java.lang.Record
org.j7m.middleware.api.messaging.NackOptions
- Record Components:
leaseId- expected lease identifiernotBefore- earliest retry timereason- safe redacted reason
- All Implemented Interfaces:
Serializable
public record NackOptions(LeaseId leaseId, Instant notBefore, String reason)
extends Record
implements Serializable
Negative acknowledge options.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNackOptions(LeaseId leaseId, Instant notBefore, String reason) Creates nack options. -
Method Summary
Modifier and TypeMethodDescriptionstatic NackOptionsdefaults()Returns default nack options.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.leaseId()Returns the value of theleaseIdrecord component.Returns the value of thenotBeforerecord component.reason()Returns the value of thereasonrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NackOptions
Creates nack options.- Throws:
IllegalArgumentException- whenreasonis too long
-
-
Method Details
-
defaults
Returns default nack options.- Returns:
- default negative acknowledge options
-
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). -
leaseId
-
notBefore
-
reason
-