Class ConcurrentBitmapSortedLongPairSet

java.lang.Object
org.apache.pulsar.utils.ConcurrentBitmapSortedLongPairSet

public class ConcurrentBitmapSortedLongPairSet extends Object
  • Constructor Details

    • ConcurrentBitmapSortedLongPairSet

      public ConcurrentBitmapSortedLongPairSet()
  • Method Details

    • add

      public void add(long item1, long item2)
    • remove

      public void remove(long item1, long item2)
    • contains

      public boolean contains(long item1, long item2)
    • removeUpTo

      public boolean removeUpTo(long item1, long item2)
      Remove all items up to (and including) the specified item.
      Parameters:
      item1 - the first part of the item key
      item2 - the second part of the item key
      Returns:
      true if any bits were cleared
    • first

      public <T extends Comparable<T>> Optional<T> first(org.apache.pulsar.common.util.collections.LongPairSet.LongPairFunction<T> longPairConverter)
    • items

      public <T extends Comparable<T>> NavigableSet<T> items(int numberOfItems, org.apache.pulsar.common.util.collections.LongPairSet.LongPairFunction<T> longPairConverter)
    • processItems

      public <T extends Comparable<T>> void processItems(org.apache.pulsar.common.util.collections.LongPairSet.LongPairFunction<T> longPairConverter, ConcurrentBitmapSortedLongPairSet.ItemProcessor<T> itemProcessor)
    • isEmpty

      public boolean isEmpty()
    • clear

      public void clear()
    • size

      public int size()