mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-04 20:28:00 +08:00
JmxControlBean : rename ClusterNodeName to NodeName
This commit is contained in:
parent
ea59abb279
commit
275dba9d6e
@ -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() {
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user