Class ConcurrentLongHashMap<V>
- java.lang.Object
-
- org.apache.activemq.artemis.utils.collections.ConcurrentLongHashMap<V>
-
- Type Parameters:
V-
public class ConcurrentLongHashMap<V> extends Object
Map from long to an Object. Provides similar methods as a ConcurrentMap<long,Object> with 2 differences:- No boxing/unboxing from long -> Long
- Open hash map with linear probing, no node allocations to store the values
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceConcurrentLongHashMap.EntryProcessor<V>
-
Constructor Summary
Constructors Constructor Description ConcurrentLongHashMap()ConcurrentLongHashMap(int expectedItems)ConcurrentLongHashMap(int expectedItems, int numSections)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcapacity()voidclear()VcomputeIfAbsent(long key, LongFunction<V> provider)booleancontainsKey(long key)voidforEach(ConcurrentLongHashMap.EntryProcessor<V> processor)Vget(long key)booleanisEmpty()List<Long>keys()ConcurrentLongHashSetkeysLongHashSet()Vput(long key, V value)VputIfAbsent(long key, V value)Vremove(long key)booleanremove(long key, Object value)intsize()List<V>values()
-
-
-
Method Detail
-
size
public int size()
-
capacity
public long capacity()
-
isEmpty
public boolean isEmpty()
-
get
public V get(long key)
-
containsKey
public boolean containsKey(long key)
-
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)
-
keysLongHashSet
public ConcurrentLongHashSet keysLongHashSet()
-
-