Class RemovedHashRanges

java.lang.Object
org.apache.pulsar.broker.service.RemovedHashRanges

public class RemovedHashRanges extends Object
Represents the hash ranges which were removed from an existing consumer by a change in the hash range assignments.
  • Method Details

    • of

      public static RemovedHashRanges of(List<org.apache.pulsar.client.api.Range> ranges)
    • containsStickyKey

      public boolean containsStickyKey(int stickyKeyHash)
      Checks if the sticky key hash is contained in the impacted hash ranges.
    • isFullyContainedInRanges

      public boolean isFullyContainedInRanges(List<org.apache.pulsar.client.api.Range> otherRanges)
      Checks if all removed ranges are fully contained in the provided list of ranges.
    • asRanges

      public List<org.apache.pulsar.client.api.Range> asRanges()
      Returns the removed hash ranges as a list of ranges.