Class ConcurrentLongHashMap<V>
- java.lang.Object
-
- org.apache.activemq.artemis.utils.collections.ConcurrentLongHashMap<V>
-
- Type Parameters:
V-
public class ConcurrentLongHashMap<V> extends java.lang.ObjectMap 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, java.util.function.LongFunction<V> provider)booleancontainsKey(long key)voidforEach(ConcurrentLongHashMap.EntryProcessor<V> processor)Vget(long key)booleanisEmpty()java.util.List<java.lang.Long>keys()ConcurrentLongHashSetkeysLongHashSet()Vput(long key, V value)VputIfAbsent(long key, V value)Vremove(long key)booleanremove(long key, java.lang.Object value)intsize()java.util.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)
-
remove
public V remove(long key)
-
remove
public boolean remove(long key, java.lang.Object value)
-
clear
public void clear()
-
forEach
public void forEach(ConcurrentLongHashMap.EntryProcessor<V> processor)
-
keys
public java.util.List<java.lang.Long> keys()
- Returns:
- a new list of all keys (makes a copy)
-
keysLongHashSet
public ConcurrentLongHashSet keysLongHashSet()
-
values
public java.util.List<V> values()
-
-