JmxControlBean : rename ClusterNodeName to NodeName

This commit is contained in:
Yuriy Artamonov 2013-01-25 12:55:05 +00:00
parent ea59abb279
commit 275dba9d6e
2 changed files with 7 additions and 8 deletions

View File

@ -39,8 +39,8 @@ public class JmxInstance extends StandardEntity {
public JmxInstance() {
}
public JmxInstance(String clusterNodeName) {
this.nodeName = clusterNodeName;
public JmxInstance(String nodeName) {
this.nodeName = nodeName;
}
public String getNodeName() {

View File

@ -41,7 +41,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
@ManagedBean(JmxControlAPI.NAME)
public class JmxControlBean implements JmxControlAPI {
private static final String CLUSTER_NODE_NAME_ATTRIBUTE = "NodeName";
private static final String NODE_NAME_ATTRIBUTE = "NodeName";
private final JmxInstance LOCAL_JMX_INSTANCE = new JmxInstance("Local");
@ -78,8 +78,7 @@ public class JmxControlBean implements JmxControlAPI {
jmxInstances.add(getLocalInstance());
List<JmxInstance> clusterInstances = dataService.loadList(loadContext);
if (clusterInstances != null)
jmxInstances.addAll(clusterInstances);
jmxInstances.addAll(clusterInstances);
return jmxInstances;
}
@ -120,9 +119,9 @@ public class JmxControlBean implements JmxControlAPI {
});
if (nodeIdentifierBeanInfo != null) {
Object clusterNodeName = connection.getAttribute(nodeIdentifierBeanInfo, CLUSTER_NODE_NAME_ATTRIBUTE);
if (clusterNodeName != null)
remoteNodeName = clusterNodeName.toString();
Object nodeName = connection.getAttribute(nodeIdentifierBeanInfo, NODE_NAME_ATTRIBUTE);
if (nodeName != null)
remoteNodeName = nodeName.toString();
else
remoteNodeName = getDefaultNodeName(instance);
} else {