Record Class EnqueueResult
java.lang.Object
java.lang.Record
org.j7m.middleware.api.messaging.EnqueueResult
- Record Components:
queue- queue that accepted the messagepartitionId- assigned partitionmessageId- assigned message idduplicate- whether a previous result was returned for a duplicate keysequence- partition-local enqueue sequence
- All Implemented Interfaces:
Serializable
public record EnqueueResult(QueueName queue, QueuePartitionId partitionId, MessageId messageId, boolean duplicate, long sequence)
extends Record
implements Serializable
Enqueue result.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEnqueueResult(QueueName queue, QueuePartitionId partitionId, MessageId messageId, boolean duplicate, long sequence) Creates enqueue result. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theduplicaterecord 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.Returns the value of thepartitionIdrecord component.queue()Returns the value of thequeuerecord component.longsequence()Returns the value of thesequencerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EnqueueResult
public EnqueueResult(QueueName queue, QueuePartitionId partitionId, MessageId messageId, boolean duplicate, long sequence) Creates enqueue result.- Throws:
IllegalArgumentException- when required identifiers are null or sequence 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. -
queue
-
partitionId
Returns the value of thepartitionIdrecord component.- Returns:
- the value of the
partitionIdrecord component
-
messageId
-
duplicate
-
sequence
-