类 ConcurrentSortedLongPairSet

java.lang.Object
org.apache.pulsar.common.util.collections.ConcurrentSortedLongPairSet
所有已实现的接口:
LongPairSet

public class ConcurrentSortedLongPairSet extends Object implements LongPairSet
Sorted concurrent LongPairSet which is not fully accurate in sorting. ConcurrentSortedLongPairSet creates separate ConcurrentLongPairSet for unique first-key of inserted item. So, it can iterate over all items by sorting on item's first key. However, item's second key will not be sorted. eg:
  insert: (1,2), (1,4), (2,1), (1,5), (2,6)
  while iterating set will first read all the entries for items whose first-key=1 and then first-key=2.
  output: (1,4), (1,5), (1,2), (2,6), (2,1)
 

This map can be expensive and not recommended if set has to store large number of unique item.first's key because set has to create that many ConcurrentLongPairSet objects.

  • 字段详细资料

  • 构造器详细资料

    • ConcurrentSortedLongPairSet

      public ConcurrentSortedLongPairSet()
    • ConcurrentSortedLongPairSet

      public ConcurrentSortedLongPairSet(int expectedItems)
    • ConcurrentSortedLongPairSet

      public ConcurrentSortedLongPairSet(int expectedItems, int concurrencyLevel)
    • ConcurrentSortedLongPairSet

      public ConcurrentSortedLongPairSet(int expectedItems, int concurrencyLevel, boolean autoShrink)
    • ConcurrentSortedLongPairSet

      public ConcurrentSortedLongPairSet(int expectedItems, int concurrencyLevel, int maxAllowedSetOnRemove)
    • ConcurrentSortedLongPairSet

      public ConcurrentSortedLongPairSet(int expectedItems, int concurrencyLevel, int maxAllowedSetOnRemove, boolean autoShrink)
  • 方法详细资料