Class ConcurrentOpenHashMap<K,​V>

  • Type Parameters:
    V -

    public class ConcurrentOpenHashMap<K,​V>
    extends java.lang.Object
    Concurrent hash map.

    Provides similar methods as a ConcurrentMap<K,V> but since it's an open hash map with linear probing, no node allocations are required to store the values.

    • Constructor Detail

      • ConcurrentOpenHashMap

        @Deprecated
        public ConcurrentOpenHashMap()
        Deprecated.
      • ConcurrentOpenHashMap

        @Deprecated
        public ConcurrentOpenHashMap​(int expectedItems)
        Deprecated.
      • ConcurrentOpenHashMap

        @Deprecated
        public ConcurrentOpenHashMap​(int expectedItems,
                                     int concurrencyLevel)
        Deprecated.
      • ConcurrentOpenHashMap

        public ConcurrentOpenHashMap​(int expectedItems,
                                     int concurrencyLevel,
                                     float mapFillFactor,
                                     float mapIdleFactor,
                                     boolean autoShrink,
                                     float expandFactor,
                                     float shrinkFactor)
    • Method Detail

      • size

        public long size()
      • capacity

        public long capacity()
      • isEmpty

        public boolean isEmpty()
      • get

        public V get​(K key)
      • containsKey

        public boolean containsKey​(K key)
      • put

        public V put​(K key,
                     V value)
      • putIfAbsent

        public V putIfAbsent​(K key,
                             V value)
      • computeIfAbsent

        public V computeIfAbsent​(K key,
                                 java.util.function.Function<K,​V> provider)
      • remove

        public V remove​(K key)
      • remove

        public boolean remove​(K key,
                              java.lang.Object value)
      • removeNullValue

        public void removeNullValue​(K key)
      • clear

        public void clear()
      • forEach

        public void forEach​(java.util.function.BiConsumer<? super K,​? super V> processor)
      • keys

        public java.util.List<K> keys()
        Returns:
        a new list of all keys (makes a copy)
      • values

        public java.util.List<V> values()