if (!connection.isConnected()) {
return "Unable to connect to cluster";
}
StringBuilder builder = new StringBuilder();
ClusterAccessor clusterAccessor = connection.createClusterAccessor(clusterId);
Cluster cluster = clusterAccessor.readCluster();
Map<ParticipantId, Participant> participants = cluster.getParticipantMap();
builder.append("AppName").append(TAB).append(clusterId).append(NEWLINE);
Map<ResourceId, Resource> resources = cluster.getResourceMap();
for (ResourceId resourceId : resources.keySet()) {
builder.append("SERVICE").append(TAB).append(resourceId).append(NEWLINE);