ITPub博客

首页 > 数据库 > > hazelcast 搭建_hazelcast Management Center 源码分析

hazelcast 搭建_hazelcast Management Center 源码分析

作者:gaokeke123 时间:2022-05-23 10:58:07 0 删除 编辑

[Java] 纯文本查看 复制代码public static License checkLicenseKeyPerFeature(String licenseKey, String versionString, Feature feature) {

License license = getLicense(licenseKey, versionString);

if (!license.getFeatures().contains(feature)) {

throw new InvalidLicenseException("The Feature " + feature.getText() + " is not enabled for your license key." + "Please contact [email]sales@hazelcast.com[/email]");

}

return license;

}

public static License getLicense(String licenseKey, String versionString) {

if (licenseKey == null) {

throw new InvalidLicenseException("License Key not configured!");

}

License license = null;

try {

license = LicenseExtractorV2.extractLicense(licenseKey);

} catch (InvalidLicenseException e1) {

try {

license = LicenseExtractorV3.extractLicense(licenseKey);

} catch (InvalidLicenseException e2) {

license = LicenseExtractorV4.extractLicense(licenseKey);

}

}

int version = extractHazelcastMajorMinorVersionAsInt(versionString);

if ((license.getHazelcastVersion() != 99) && (license.getHazelcastVersion() != version)) {

throw new InvalidLicenseException("This license cannot work with your hazelcast version!");

}

if ((license.isTrial()) && (isExpired(license))) {

throw new InvalidLicenseException("Trial license has expired! Please contact [email]sales@hazelcast.com[/email]");

}

if (isExpired(license)) {

throw new InvalidLicenseException("Enterprise License has expired! Please contact [email]sales@hazelcast.com[/email]");

}

return license;

}
————————————————
版权声明:本文为CSDN博主「weixin_39559559」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_39559559/article/details/111985888

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26692020/viewspace-3138030/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
大家好

注册时间:2013-08-14

  • 博文量
    1432
  • 访问量
    31650