*/
public void joinGroup(String targetGroupName) {
Node node = clusterManager.getNode();
Map<String, Group> groups = groupManager.listGroups();
if (groups != null && !groups.isEmpty()) {
Group targetGroup = groups.get(targetGroupName);
if (targetGroup == null) {
groupManager.registerGroup(targetGroupName);
} else if (!targetGroup.getNodes().contains(node)) {
targetGroup.getNodes().add(node);
groupManager.listGroups().put(targetGroupName, targetGroup);
groupManager.registerGroup(targetGroup);
}
}
}