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() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public JmxInstance(String clusterNodeName) {
|
public JmxInstance(String nodeName) {
|
||||||
this.nodeName = clusterNodeName;
|
this.nodeName = nodeName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getNodeName() {
|
public String getNodeName() {
|
||||||
|
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user