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() {
} }
public JmxInstance(String clusterNodeName) { public JmxInstance(String nodeName) {
this.nodeName = clusterNodeName; this.nodeName = nodeName;
} }
public String getNodeName() { public String getNodeName() {

View File

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