com.hazelcast.instance.Node.getManagementCenterService()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(5.2k)|赞(0)|评价(0)|浏览(255)

本文整理了Java中com.hazelcast.instance.Node.getManagementCenterService()方法的一些代码示例,展示了Node.getManagementCenterService()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.getManagementCenterService()方法的具体详情如下:
包路径:com.hazelcast.instance.Node
类名称:Node
方法名:getManagementCenterService

Node.getManagementCenterService介绍

暂无

代码示例

代码示例来源:origin: com.hazelcast/hazelcast-all

  1. public ManagementCenterService getManagementCenterService() {
  2. return node.getManagementCenterService();
  3. }

代码示例来源:origin: hazelcast/hazelcast-jet

  1. public ManagementCenterService getManagementCenterService() {
  2. return node.getManagementCenterService();
  3. }

代码示例来源:origin: hazelcast/hazelcast-jet

  1. @Override
  2. public void syncAllMaps(String wanReplicationName, String targetGroupName) {
  3. node.getManagementCenterService().log(
  4. WanSyncIgnoredEvent.enterpriseOnly(wanReplicationName, targetGroupName, null));
  5. throw new UnsupportedOperationException("WAN sync is not supported.");
  6. }

代码示例来源:origin: hazelcast/hazelcast-jet

  1. @Override
  2. public void syncMap(String wanReplicationName, String targetGroupName, String mapName) {
  3. node.getManagementCenterService().log(
  4. WanSyncIgnoredEvent.enterpriseOnly(wanReplicationName, targetGroupName, mapName));
  5. throw new UnsupportedOperationException("WAN sync for map is not supported.");
  6. }

代码示例来源:origin: hazelcast/hazelcast-jet

  1. @Override
  2. public void consistencyCheck(String wanReplicationName, String targetGroupName, String mapName) {
  3. node.getManagementCenterService().log(
  4. new WanConsistencyCheckIgnoredEvent(wanReplicationName, targetGroupName, mapName,
  5. "Consistency check is supported for enterprise clusters only."));
  6. throw new UnsupportedOperationException("Consistency check is not supported.");
  7. }

代码示例来源:origin: com.hazelcast/hazelcast-all

  1. @Override
  2. public void syncMap(String wanReplicationName, String targetGroupName, String mapName) {
  3. node.getManagementCenterService().log(
  4. WanSyncIgnoredEvent.enterpriseOnly(wanReplicationName, targetGroupName, mapName));
  5. throw new UnsupportedOperationException("WAN sync for map is not supported.");
  6. }

代码示例来源:origin: com.hazelcast/hazelcast-all

  1. @Override
  2. public void syncAllMaps(String wanReplicationName, String targetGroupName) {
  3. node.getManagementCenterService().log(
  4. WanSyncIgnoredEvent.enterpriseOnly(wanReplicationName, targetGroupName, null));
  5. throw new UnsupportedOperationException("WAN sync is not supported.");
  6. }

代码示例来源:origin: com.hazelcast/hazelcast-all

  1. @Override
  2. public void consistencyCheck(String wanReplicationName, String targetGroupName, String mapName) {
  3. node.getManagementCenterService().log(
  4. new WanConsistencyCheckIgnoredEvent(wanReplicationName, targetGroupName, mapName,
  5. "Consistency check is supported for enterprise clusters only."));
  6. throw new UnsupportedOperationException("Consistency check is not supported.");
  7. }

代码示例来源:origin: com.hazelcast/hazelcast-all

  1. @Override
  2. public void addWanReplicationConfig(WanReplicationConfig wanConfig) {
  3. node.getManagementCenterService().log(AddWanConfigIgnoredEvent.enterpriseOnly(wanConfig.getName()));
  4. throw new UnsupportedOperationException("Adding new WAN config is not supported.");
  5. }

代码示例来源:origin: hazelcast/hazelcast-jet

  1. @Override
  2. public AddWanConfigResult addWanReplicationConfig(WanReplicationConfig wanConfig) {
  3. node.getManagementCenterService().log(AddWanConfigIgnoredEvent.enterpriseOnly(wanConfig.getName()));
  4. throw new UnsupportedOperationException("Adding new WAN config is not supported.");
  5. }

代码示例来源:origin: com.hazelcast/hazelcast-all

  1. private void handleManagementCenterUrlChange(HttpPostCommand command) throws UnsupportedEncodingException {
  2. if (textCommandService.getNode().getProperties().getBoolean(GroupProperty.MC_URL_CHANGE_ENABLED)) {
  3. byte[] res = HttpCommand.RES_204;
  4. byte[] data = command.getData();
  5. String[] strList = bytesToString(data).split("&");
  6. String cluster = URLDecoder.decode(strList[0], "UTF-8");
  7. String pass = URLDecoder.decode(strList[1], "UTF-8");
  8. String url = URLDecoder.decode(strList[2], "UTF-8");
  9. ManagementCenterService managementCenterService = textCommandService.getNode().getManagementCenterService();
  10. if (managementCenterService != null) {
  11. res = managementCenterService.clusterWideUpdateManagementCenterUrl(cluster, pass, url);
  12. }
  13. command.setResponse(res);
  14. } else {
  15. command.setResponse(HttpCommand.RES_503);
  16. }
  17. }

代码示例来源:origin: hazelcast/hazelcast-jet

  1. private void handleManagementCenterUrlChange(HttpPostCommand command) throws UnsupportedEncodingException {
  2. HazelcastProperties properties = textCommandService.getNode().getProperties();
  3. if (! properties.getBoolean(GroupProperty.MC_URL_CHANGE_ENABLED)) {
  4. logger.warning("Hazelcast property " + GroupProperty.MC_URL_CHANGE_ENABLED.getName() + " is deprecated.");
  5. command.setResponse(HttpCommand.RES_503);
  6. return;
  7. }
  8. byte[] res;
  9. String[] strList = bytesToString(command.getData()).split("&");
  10. if (authenticate(command, strList[0], strList.length > 1 ? strList[1] : null)) {
  11. ManagementCenterService managementCenterService = textCommandService.getNode().getManagementCenterService();
  12. if (managementCenterService != null) {
  13. String url = URLDecoder.decode(strList[2], "UTF-8");
  14. res = managementCenterService.clusterWideUpdateManagementCenterUrl(url);
  15. } else {
  16. logger.warning(
  17. "Unable to change URL of ManagementCenter as the ManagementCenterService is not running on this member.");
  18. res = HttpCommand.RES_204;
  19. }
  20. } else {
  21. res = HttpCommand.RES_403;
  22. }
  23. command.setResponse(res);
  24. }

相关文章