Record Class NackResult
java.lang.Object
java.lang.Record
org.j7m.middleware.api.messaging.NackResult
- Record Components:
messageId- message identifierstate- state after negative acknowledgementretryCount- updated retry countdeadLettered- whether the message moved to the dead-letter set
- All Implemented Interfaces:
Serializable
public record NackResult(MessageId messageId, MessageState state, int retryCount, boolean deadLettered)
extends Record
implements Serializable
Nack result.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNackResult(MessageId messageId, MessageState state, int retryCount, boolean deadLettered) Creates nack result. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thedeadLetteredrecord 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 themessageIdrecord component.intReturns the value of theretryCountrecord component.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NackResult
Creates nack result.- Throws:
IllegalArgumentException- when required values are null or retry count is negative
-
-
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. -
messageId
-
state
-
retryCount
public int retryCount()Returns the value of theretryCountrecord component.- Returns:
- the value of the
retryCountrecord component
-
deadLettered
public boolean deadLettered()Returns the value of thedeadLetteredrecord component.- Returns:
- the value of the
deadLetteredrecord component
-