Class ConcurrentWeakIdentityHashMap<K,V>
java.lang.Object
com.oracle.truffle.js.runtime.util.ConcurrentWeakIdentityHashMap<K,V>
- All Implemented Interfaces:
Map<K,V>
Thread-safe WeakHashMap alternative based on
ConcurrentHashMap to avoid lock contention
for lookups.
Keys are compared by object identity. Keys and values must not be null.
Inspired by jdk.internal.util.ReferencedKeyMap.
Only partially implements the Map interface; unused methods are omitted for simplicity.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) static <K,V> ConcurrentWeakIdentityHashMap <K, V> create()entrySet()voidforEach(BiConsumer<? super K, ? super V> action) booleanisEmpty()keySet()voidputIfAbsent(K key, V value) booleanintsize()values()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, equals, getOrDefault, hashCode, merge, replace, replace, replaceAll
-
Method Details
-
create
-
get
-
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V>
-
put
-
putIfAbsent
-
clear
-
remove
-
remove
-
forEach
-
putAll
-
size
-
isEmpty
-
keySet
-
values
-
entrySet
-