绑定完请刷新页面
取消
刷新

分享好友

×
取消 复制
hazelcast 搭建_hazelcast Management Center 源码分析
2022-05-23 10:58:07

[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

分享好友

分享这个小栈给你的朋友们,一起进步吧。

Hazelcast
创建时间:2022-04-18 14:01:59
Hazelcast
展开
订阅须知

• 所有用户可根据关注领域订阅专区或所有专区

• 付费订阅:虚拟交易,一经交易不退款;若特殊情况,可3日内客服咨询

• 专区发布评论属默认订阅所评论专区(除付费小栈外)

技术专家

查看更多
  • 飘絮絮絮丶
    专家
戳我,来吐槽~