Java AtomicInteger addNodeUse(String nodeInfo)

Here you can find the source of addNodeUse(String nodeInfo)

Description

add Node Use

License

GNU General Public License

Declaration

public static void addNodeUse(String nodeInfo) 

Method Source Code

//package com.java2s;
/**/*from  w ww . j a va2  s .  co m*/
 * ?????????????????????????.<br>
 *
 * @author T.Okuyama
 * @license GPL(Lv3)
 */

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;

public class Main {
    private static ConcurrentHashMap nodeExecMap = new ConcurrentHashMap(50, 40, 300);

    public static void addNodeUse(String nodeInfo) {
        AtomicInteger cnt = (AtomicInteger) nodeExecMap.get(nodeInfo);
        cnt.incrementAndGet();
        nodeExecMap.put(nodeInfo, cnt);
    }
}

Related

  1. bitwiseOrAndGet(final AtomicInteger ai, final int toOrValue)
  2. count()
  3. count(byte[] array, byte value)
  4. countDownToZero(AtomicInteger counter)