class FileLock {

    public void waitForRelease(@NonNull String filePath) {
        AtomicInteger lockCount;
        synchronized (fileLockCountMap) {
            lockCount = fileLockCountMap.get(filePath);
        }
        if (lockCount == null || lockCount.get() <= 0) return;

        synchronized (waitThreadForFileLockMap) {
            waitThreadForFileLockMap.put(filePath, Thread.currentThread());
        }
        Util.d(TAG, "waitForRelease start " + filePath);
        while (true) {
            if (isNotLocked(lockCount)) break;
            park();
        }
        Util.d(TAG, "waitForRelease finish " + filePath);
    }

      FileLock(@NonNull Map<String, AtomicInteger> fileLockCountMap,
             @NonNull Map<String, Thread> waitThreadForFileLockMap);
      FileLock();

}