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

org.apichart.common.modules.context.LicenseManagerHolder Maven / Gradle / Ivy

Go to download

project for Spring Boot, to provide a reference for ensuring the stability of the system!

The newest version!
package org.apichart.common.modules.context;

import de.schlichtherle.license.LicenseManager;
import de.schlichtherle.license.LicenseParam;

/**
 * de.schlichtherle.license.LicenseManager的单例
 */
public class LicenseManagerHolder {

    private static volatile LicenseManager LICENSE_MANAGER;

    public static LicenseManager getInstance(LicenseParam param){
        if(LICENSE_MANAGER == null){
            synchronized (LicenseManagerHolder.class){
                if(LICENSE_MANAGER == null){
                    LICENSE_MANAGER = new CustomLicenseManager(param);
                }
            }
        }

        return LICENSE_MANAGER;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy