Search in sources :

Example 6 with GetHeartbeatNodeInfoTask

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());
    }
}
Also used : HAHostStatusInfo(com.cubrid.cubridmanager.core.mondashboard.model.HAHostStatusInfo) GetHAConfParameterTask(com.cubrid.cubridmanager.core.common.task.GetHAConfParameterTask) GetHeartbeatNodeInfoTask(com.cubrid.cubridmanager.core.mondashboard.task.GetHeartbeatNodeInfoTask)

Aggregations

GetHeartbeatNodeInfoTask (com.cubrid.cubridmanager.core.mondashboard.task.GetHeartbeatNodeInfoTask)6 ArrayList (java.util.ArrayList)4 CommonTaskExec (com.cubrid.common.ui.spi.progress.CommonTaskExec)2 ExecTaskWithProgress (com.cubrid.common.ui.spi.progress.ExecTaskWithProgress)2 TaskExecutor (com.cubrid.common.ui.spi.progress.TaskExecutor)2 BrokerInfos (com.cubrid.cubridmanager.core.broker.model.BrokerInfos)2 GetHAConfParameterTask (com.cubrid.cubridmanager.core.common.task.GetHAConfParameterTask)2 DatabaseInfo (com.cubrid.cubridmanager.core.cubrid.database.model.DatabaseInfo)2 HADatabaseStatusInfo (com.cubrid.cubridmanager.core.mondashboard.model.HADatabaseStatusInfo)2 HAHostStatusInfo (com.cubrid.cubridmanager.core.mondashboard.model.HAHostStatusInfo)2 DatabaseNode (com.cubrid.cubridmanager.ui.mondashboard.editor.model.DatabaseNode)2 List (java.util.List)2 Map (java.util.Map)2 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)2 SelectionEvent (org.eclipse.swt.events.SelectionEvent)2 GridData (org.eclipse.swt.layout.GridData)2 GridLayout (org.eclipse.swt.layout.GridLayout)2 RowLayout (org.eclipse.swt.layout.RowLayout)2 Button (org.eclipse.swt.widgets.Button)2 Composite (org.eclipse.swt.widgets.Composite)2