Class ConcurrentLongHashMap<V>

java.lang.Object
org.apache.activemq.artemis.utils.collections.ConcurrentLongHashMap<V>

public class ConcurrentLongHashMap<V> extends Object
Map from long to an Object.

Provides similar methods as a ConcurrentMap<long,Object> with 2 differences:

  1. No boxing/unboxing from long -> Long
  2. Open hash map with linear probing, no node allocations to store the values
  • Constructor Details

    • ConcurrentLongHashMap

      public ConcurrentLongHashMap()
    • ConcurrentLongHashMap

      public ConcurrentLongHashMap(int expectedItems)
    • ConcurrentLongHashMap

      public ConcurrentLongHashMap(int expectedItems, int numSections)
  • Method Details

    • size

      public int size()
    • capacity

      public long capacity()
    • isEmpty

      public boolean isEmpty()
    • get

      public V get(long key)
    • containsKey

      public boolean containsKey(long key)
    • put

      public V put(long key, V value)
    • putIfAbsent

      public V putIfAbsent(long key, V value)
    • computeIfAbsent

      public V computeIfAbsent(long key, LongFunction<V> provider)
    • remove

      public V remove(long key)
    • remove

      public boolean remove(long key, Object value)
    • clear

      public void clear()
    • forEach

      public void forEach(ConcurrentLongHashMap.EntryProcessor<V> processor)
    • keys

      public List<Long> keys()
      Returns:
      a new list of all keys (makes a copy)
    • keysLongHashSet

      public ConcurrentLongHashSet keysLongHashSet()
    • values

      public List<V> values()