Package org.apache.pulsar.broker.service
Record Class HashRangeAssignment
java.lang.Object
java.lang.Record
org.apache.pulsar.broker.service.HashRangeAssignment
public record HashRangeAssignment(org.apache.pulsar.client.api.Range range, Consumer consumer)
extends Record
Hash range assignment in
StickyKeyConsumerSelector implementations.-
Constructor Summary
ConstructorsConstructorDescriptionHashRangeAssignment(org.apache.pulsar.client.api.Range range, Consumer consumer) Creates an instance of aHashRangeAssignmentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionconsumer()Returns the value of theconsumerrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.org.apache.pulsar.client.api.Rangerange()Returns the value of therangerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
HashRangeAssignment
Creates an instance of aHashRangeAssignmentrecord class.- Parameters:
range- the value for therangerecord componentconsumer- the value for theconsumerrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
range
public org.apache.pulsar.client.api.Range range()Returns the value of therangerecord component.- Returns:
- the value of the
rangerecord component
-
consumer
Returns the value of theconsumerrecord component.- Returns:
- the value of the
consumerrecord component
-