Package org.jruby.java.invokers
Class RubyToJavaInvoker.NullHashMapLong<V>
java.lang.Object
java.util.AbstractMap<Long,TypeV>
org.jruby.util.collections.NonBlockingHashMapLong<V>
org.jruby.java.invokers.RubyToJavaInvoker.NullHashMapLong<V>
- All Implemented Interfaces:
Serializable,ConcurrentMap<Long,,V> Map<Long,V>
- Enclosing class:
- RubyToJavaInvoker<T extends JavaCallable>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jruby.util.collections.NonBlockingHashMapLong
NonBlockingHashMapLong.IteratorLongNested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAuto-boxing version ofNonBlockingHashMapLong.get(long).Maps the specified key to the specified value in the table.putIfAbsent(long key, V val) Atomically, do aNonBlockingHashMapLong.put(long, TypeV)if-and-only-if the key is not mapped.Methods inherited from class org.jruby.util.collections.NonBlockingHashMapLong
clear, contains, containsKey, containsKey, containsValue, elements, entrySet, get, keys, keySet, put, putIfAbsent, remove, remove, remove, remove, replace, replace, replace, replace, reprobes, size, valuesMethods inherited from class java.util.AbstractMap
clone, equals, hashCode, isEmpty, putAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.concurrent.ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAll
-
Constructor Details
-
NullHashMapLong
NullHashMapLong()
-
-
Method Details
-
put
Description copied from class:NonBlockingHashMapLongMaps the specified key to the specified value in the table. The value cannot be null.The value can be retrieved by calling
NonBlockingHashMapLong.get(long)with a key that is equal to the original key.- Overrides:
putin classNonBlockingHashMapLong<V>- Parameters:
key- key with which the specified value is to be associatedval- value to be associated with the specified key- Returns:
- the previous value associated with key, or null if there was no mapping for key
-
putIfAbsent
Description copied from class:NonBlockingHashMapLongAtomically, do aNonBlockingHashMapLong.put(long, TypeV)if-and-only-if the key is not mapped. Useful to ensure that only a single mapping for the key exists, even if many threads are trying to create the mapping in parallel.- Overrides:
putIfAbsentin classNonBlockingHashMapLong<V>- Returns:
- the previous value associated with the specified key, or null if there was no mapping for the key
-
get
Description copied from class:NonBlockingHashMapLongAuto-boxing version ofNonBlockingHashMapLong.get(long).
-