Java ConcurrentMap createConcurrentMap(int initial_capacity, float load_factor, int concurrency_level)

Here you can find the source of createConcurrentMap(int initial_capacity, float load_factor, int concurrency_level)

Description

create Concurrent Map

License

LGPL

Declaration

public static <K, V> ConcurrentMap<K, V> createConcurrentMap(int initial_capacity, float load_factor,
            int concurrency_level) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

import java.util.concurrent.*;

public class Main {
    protected static int CCHM_INITIAL_CAPACITY = 16;
    protected static float CCHM_LOAD_FACTOR = 0.75f;
    protected static int CCHM_CONCURRENCY_LEVEL = 16;

    public static <K, V> ConcurrentMap<K, V> createConcurrentMap(int initial_capacity, float load_factor,
            int concurrency_level) {
        return new ConcurrentHashMap<K, V>(initial_capacity, load_factor, concurrency_level);
    }/*from  w ww .jav a2 s  . co m*/

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

    public static <K, V> ConcurrentMap<K, V> createConcurrentMap() {
        return new ConcurrentHashMap<K, V>(CCHM_INITIAL_CAPACITY, CCHM_LOAD_FACTOR, CCHM_CONCURRENCY_LEVEL);
    }
}

Related

  1. clearClassMapping()
  2. clearDefaultResourceBundles()
  3. create(boolean sorted)
  4. createConcurrentMap()
  5. createConcurrentMap()
  6. extractKeySize(String sslCipherSuite)
  7. fileReaderDecrement(ConcurrentMap readers, Long fileNum)
  8. fileReaderIncrement(ConcurrentMap readers, Long fileNum)
  9. get(Class clazz)