Here you can find the source of fileReaderIncrement(ConcurrentMap
public static void fileReaderIncrement(ConcurrentMap<Long, Long> readers, Long fileNum)
//package com.java2s; //License from project: Open Source License import java.util.concurrent.ConcurrentMap; public class Main { public static void fileReaderIncrement(ConcurrentMap<Long, Long> readers, Long fileNum) { readers.compute(fileNum, (key, value) -> value == null ? 1L : value + 1L); }/*from ww w . jav a 2s. c o m*/ }