use of com.cubrid.cubridmanager.core.mondashboard.task.GetHeartbeatNodeInfoTask in project cubrid-manager by CUBRID.
the class CubridServerLoader method getHostStatus.
/**
* Get host status
*
* @param server - CubridServer
*/
private void getHostStatus(final CubridServer server) {
final GetHeartbeatNodeInfoTask getHeartbeatNodeInfoTask = new GetHeartbeatNodeInfoTask(server.getServerInfo());
getHeartbeatNodeInfoTask.setAllDb(true);
getHeartbeatNodeInfoTask.execute();
if (getHeartbeatNodeInfoTask.isSuccess()) {
HAHostStatusInfo haHostStatusInfo = getHeartbeatNodeInfoTask.getHostStatusInfo(server.getServerInfo().getHostAddress());
if (haHostStatusInfo != null) {
server.getServerInfo().setHaHostStatusInfo(haHostStatusInfo);
}
} else {
LOGGER.debug("Get host status error:" + getHeartbeatNodeInfoTask.getErrorMsg());
}
final GetHAConfParameterTask getHAConfParameterTask = new GetHAConfParameterTask(server.getServerInfo());
getHAConfParameterTask.execute();
if (getHAConfParameterTask.isSuccess()) {
server.getServerInfo().setHaConfParaMap(getHAConfParameterTask.getConfParameters());
} else {
LOGGER.debug("Get host ha status error:" + getHAConfParameterTask.getErrorMsg());
}
}
Aggregations