Record Class QueuePartitionId
java.lang.Object
java.lang.Record
org.j7m.middleware.api.messaging.QueuePartitionId
- Record Components:
value- non-negative partition number
- All Implemented Interfaces:
Serializable, Comparable<QueuePartitionId>
public record QueuePartitionId(int value)
extends Record
implements Serializable, Comparable<QueuePartitionId>
Zero-based queue partition identifier.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(QueuePartitionId other) Compares this partition id to another partition id.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.intvalue()Returns the value of thevaluerecord component.
-
Constructor Details
-
QueuePartitionId
public QueuePartitionId(int value) Creates a partition id.- Throws:
IllegalArgumentException- when the value is negative
-
-
Method Details
-
compareTo
Compares this partition id to another partition id.- Specified by:
compareToin interfaceComparable<QueuePartitionId>- Parameters:
other- other partition id- Returns:
- negative, zero, or positive according to normal comparison rules
-
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 with thecomparemethod from their corresponding wrapper classes. -
value
-