All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yhzdys.myosotis.support.LockStore Maven / Gradle / Ivy

There is a newer version: 1.3.4
Show newest version
package com.yhzdys.myosotis.support;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public final class LockStore {

    private static final Map lockMap = new ConcurrentHashMap<>(2);

    public static Lock get(String key) {
        return lockMap.computeIfAbsent(key, k -> new Lock());
    }

    private static class Lock {
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy