Record Class LeaseOptions
java.lang.Object
java.lang.Record
org.j7m.middleware.api.messaging.LeaseOptions
- Record Components:
maxMessages- maximum messages to leasevisibilityTimeout- visibility timeout for leased messagesconsumerGroupId- optional consumer group identity
- All Implemented Interfaces:
Serializable
public record LeaseOptions(int maxMessages, VisibilityTimeout visibilityTimeout, ConsumerGroupId consumerGroupId)
extends Record
implements Serializable
Lease request options.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLeaseOptions(int maxMessages, VisibilityTimeout visibilityTimeout, ConsumerGroupId consumerGroupId) Creates lease options. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconsumerGroupIdrecord component.static LeaseOptionsdefaults()Returns default lease options.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxMessagesrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevisibilityTimeoutrecord component.
-
Constructor Details
-
LeaseOptions
public LeaseOptions(int maxMessages, VisibilityTimeout visibilityTimeout, ConsumerGroupId consumerGroupId) Creates lease options.
-
-
Method Details
-
defaults
-
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. -
maxMessages
public int maxMessages()Returns the value of themaxMessagesrecord component.- Returns:
- the value of the
maxMessagesrecord component
-
visibilityTimeout
Returns the value of thevisibilityTimeoutrecord component.- Returns:
- the value of the
visibilityTimeoutrecord component
-
consumerGroupId
Returns the value of theconsumerGroupIdrecord component.- Returns:
- the value of the
consumerGroupIdrecord component
-