Java ReentrantLock readSyncLock(String id)

Here you can find the source of readSyncLock(String id)

Description

read Sync Lock

License

Open Source License

Declaration

public static void readSyncLock(String id) 

Method Source Code


//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
        }
    }
}

Related

  1. getAudioLock()
  2. getLock(String id)
  3. getLockInfo(ReentrantLock lock)
  4. isRepair()
  5. lock()
  6. removeJavaStdLoggerHandlers()
  7. runConcurrent(long startGapTime, Runnable... tasks)
  8. runUnderLock(ReentrantLock lock, Runnable runnable)
  9. toLazyCollection(Stream stream)