Here you can find the source of readSyncLock(String id)
public static void readSyncLock(String id)
//package com.java2s; import java.util.HashMap; import java.util.Map; import java.util.concurrent.locks.ReentrantLock; public class Main { private static Map<String, ReentrantLock> lockPool = new HashMap<String, ReentrantLock>(); public static void readSyncLock(String id) { if (lockPool.containsKey(id)) { lockPool.get(id).lock();//from ww w .j a v a2 s . com } } }