Search in sources :

Example 16 with BrokerStatusInfos

use of com.cubrid.cubridmanager.core.broker.model.BrokerStatusInfos in project cubrid-manager by CUBRID.

the class BrokerDBListNode method propertyChange.

/**
	 * Litsen the broker's status changing.
	 *
	 * @param evt PropertyChangeEvent
	 */
public void propertyChange(PropertyChangeEvent evt) {
    if (BrokerNode.PROP_BROKER_STATUS.equals(evt.getPropertyName())) {
        BrokerStatusInfos bsi = brokerNode.getBrokerStatusInfos();
        dbList.clear();
        if (bsi == null || bsi.getAsinfo() == null || bsi.getAsinfo().isEmpty()) {
            fireStructureChange(PROP_DB_LIST, dbList);
            return;
        }
        for (ApplyServerInfo asi : bsi.getAsinfo()) {
            if ("IDLE".equals(asi.getAs_status()) || StringUtil.isEmpty(asi.getAs_dbname()) || dbList.contains(asi.getAs_dbname())) {
                continue;
            }
            dbList.add(asi.getAs_dbname());
        }
        fireStructureChange(PROP_DB_LIST, dbList);
    }
}
Also used : ApplyServerInfo(com.cubrid.cubridmanager.core.broker.model.ApplyServerInfo) BrokerStatusInfos(com.cubrid.cubridmanager.core.broker.model.BrokerStatusInfos)

Aggregations

BrokerStatusInfos (com.cubrid.cubridmanager.core.broker.model.BrokerStatusInfos)16 ApplyServerInfo (com.cubrid.cubridmanager.core.broker.model.ApplyServerInfo)10 BrokerInfoList (com.cubrid.cubridmanager.core.broker.model.BrokerInfoList)6 BrokerInfos (com.cubrid.cubridmanager.core.broker.model.BrokerInfos)5 GetBrokerStatusInfosTask (com.cubrid.cubridmanager.core.broker.task.GetBrokerStatusInfosTask)5 ArrayList (java.util.ArrayList)5 HashMap (java.util.HashMap)4 BrokerInfo (com.cubrid.cubridmanager.core.broker.model.BrokerInfo)3 ServerInfo (com.cubrid.cubridmanager.core.common.model.ServerInfo)3 HashSet (java.util.HashSet)2 List (java.util.List)2 CommonTaskExec (com.cubrid.common.ui.spi.progress.CommonTaskExec)1 ExecTaskWithProgress (com.cubrid.common.ui.spi.progress.ExecTaskWithProgress)1 TaskExecutor (com.cubrid.common.ui.spi.progress.TaskExecutor)1 JobInfo (com.cubrid.cubridmanager.core.broker.model.JobInfo)1 CommonQueryTask (com.cubrid.cubridmanager.core.common.task.CommonQueryTask)1 BrokerNode (com.cubrid.cubridmanager.core.cubrid.service.model.BrokerNode)1 BrokerDiagData (com.cubrid.cubridmanager.core.monitoring.model.BrokerDiagData)1 BrokerNode (com.cubrid.cubridmanager.ui.mondashboard.editor.model.BrokerNode)1 Set (java.util.Set)1