Package org.apache.pulsar.broker.service
Class RemovedHashRanges
java.lang.Object
org.apache.pulsar.broker.service.RemovedHashRanges
Represents the hash ranges which were removed from an existing consumer by a change in the hash range assignments.
-
Method Summary
Modifier and TypeMethodDescriptionList<org.apache.pulsar.client.api.Range>asRanges()Returns the removed hash ranges as a list of ranges.booleancontainsStickyKey(int stickyKeyHash) Checks if the sticky key hash is contained in the impacted hash ranges.booleanisFullyContainedInRanges(List<org.apache.pulsar.client.api.Range> otherRanges) Checks if all removed ranges are fully contained in the provided list of ranges.static RemovedHashRanges
-
Method Details
-
of
-
containsStickyKey
public boolean containsStickyKey(int stickyKeyHash) Checks if the sticky key hash is contained in the impacted hash ranges. -
isFullyContainedInRanges
Checks if all removed ranges are fully contained in the provided list of ranges. -
asRanges
Returns the removed hash ranges as a list of ranges.
-