Class ConcurrentHashMapWithProducer<K,​V>

  • All Implemented Interfaces:
    Serializable, ConcurrentMap<K,​V>, Map<K,​V>

    public class ConcurrentHashMapWithProducer<K,​V>
    extends ConcurrentHashMap<K,​V>
    A concurrent map supporting a value-creating get. There's a small window where the value producing function could be called multiple times on different threads, but the first one will be used and the others thrown away.
    See Also:
    Serialized Form
    • Constructor Detail

      • ConcurrentHashMapWithProducer

        public ConcurrentHashMapWithProducer()
      • ConcurrentHashMapWithProducer

        public ConcurrentHashMapWithProducer​(int initialCapacity,
                                             float loadFactor,
                                             int concurrencyLevel)
      • ConcurrentHashMapWithProducer

        public ConcurrentHashMapWithProducer​(int initialCapacity,
                                             float loadFactor)
      • ConcurrentHashMapWithProducer

        public ConcurrentHashMapWithProducer​(int initialCapacity)
      • ConcurrentHashMapWithProducer

        public ConcurrentHashMapWithProducer​(Map<? extends K,​? extends V> m)