LauncherLifecycleCommands.java 文件源码

java
阅读 26 收藏 0 点赞 0 评论 0

项目:monarch 作者:
private String getCurrentLocators() throws MalformedObjectNameException {
  String delimitedLocators = "";
  try {
    if (isConnectedAndReady()) {
      final DistributedSystemMXBean dsMBeanProxy = getDistributedSystemMXBean();
      if (dsMBeanProxy != null) {
        final String[] locators = dsMBeanProxy.listLocators();
        if (locators != null && locators.length > 0) {
          final StringBuilder sb = new StringBuilder();
          for (int i = 0; i < locators.length; i++) {
            if (i > 0) {
              sb.append(",");
            }
            sb.append(locators[i]);
          }
          delimitedLocators = sb.toString();
        }
      }
    }
  } catch (IOException e) { // thrown by getDistributedSystemMXBean
    // leave delimitedLocators = ""
    getGfsh().logWarning("DistributedSystemMXBean is unavailable\n", e);
  }
  return delimitedLocators;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号