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

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

本文整理了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

public ManagementCenterService getManagementCenterService() {
  return node.getManagementCenterService();
}

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

public ManagementCenterService getManagementCenterService() {
  return node.getManagementCenterService();
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

private void handleManagementCenterUrlChange(HttpPostCommand command) throws UnsupportedEncodingException {
  HazelcastProperties properties = textCommandService.getNode().getProperties();
  if (! properties.getBoolean(GroupProperty.MC_URL_CHANGE_ENABLED)) {
    logger.warning("Hazelcast property " + GroupProperty.MC_URL_CHANGE_ENABLED.getName() + " is deprecated.");
    command.setResponse(HttpCommand.RES_503);
    return;
  }
  byte[] res;
  String[] strList = bytesToString(command.getData()).split("&");
  if (authenticate(command, strList[0], strList.length > 1 ? strList[1] : null)) {
    ManagementCenterService managementCenterService = textCommandService.getNode().getManagementCenterService();
    if (managementCenterService != null) {
      String url = URLDecoder.decode(strList[2], "UTF-8");
      res = managementCenterService.clusterWideUpdateManagementCenterUrl(url);
    } else {
      logger.warning(
          "Unable to change URL of ManagementCenter as the ManagementCenterService is not running on this member.");
      res = HttpCommand.RES_204;
    }
  } else {
    res = HttpCommand.RES_403;
  }
  command.setResponse(res);
}

相关文章

微信公众号

最新文章

更多