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

com.neko233.skilltree.idGenerator.IdGeneratorManager Maven / Gradle / Ivy

There is a newer version: 0.3.6
Show newest version
package com.neko233.skilltree.idGenerator;

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

/**
 * IdGenerator 管理
 *
 * @author SolarisNeko on 2022-12-29
 **/
public class IdGeneratorManager {

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


    public static boolean register(String businessName,
                                   IdGenerator idGenerator) {
        cache.put(businessName, idGenerator);
        return true;
    }

    public static IdGenerator get(String businessName) {
        return cache.get(businessName);
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy