Java ConcurrentMap createConcurrentMap()

Here you can find the source of createConcurrentMap()

Description

create Concurrent Map

License

Open Source License

Declaration

public static <K, V> ConcurrentMap<K, V> createConcurrentMap() 

Method Source Code

//package com.java2s;

import java.util.Map;

import java.util.concurrent.ConcurrentHashMap;

import java.util.concurrent.ConcurrentMap;

public class Main {

    public static <K, V> ConcurrentMap<K, V> createConcurrentMap() {
        return new ConcurrentHashMap<K, V>();
    }/* ww  w.j  a  v  a  2 s .c  om*/

    public static <K, V> ConcurrentMap<K, V> createConcurrentMap(Map<? extends K, ? extends V> map) {
        if (map == null) {
            return null;
        }

        return new ConcurrentHashMap<K, V>(map);
    }

    public static <K, V> ConcurrentMap<K, V> createConcurrentMap(int initialCapacity) {
        return new ConcurrentHashMap<K, V>(initialCapacity);
    }

    public static <K, V> ConcurrentMap<K, V> createConcurrentMap(int initialCapacity, float loadFactor) {
        return new ConcurrentHashMap<K, V>(initialCapacity, loadFactor);
    }
}

Related

  1. addConcurrent(K key, C values, ConcurrentMap map)
  2. addIfAbsent(K key, ConcurrentMap map, Object value)
  3. clearClassMapping()
  4. clearDefaultResourceBundles()
  5. create(boolean sorted)
  6. createConcurrentMap()
  7. createConcurrentMap(int initial_capacity, float load_factor, int concurrency_level)
  8. extractKeySize(String sslCipherSuite)
  9. fileReaderDecrement(ConcurrentMap readers, Long fileNum)