use of com.cubrid.cubridmanager.ui.mondashboard.editor.figure.BrokerMonitorFigure in project cubrid-manager by CUBRID.
the class BrokerMonitorPart method refreshVisuals.
/**
* Refreshes this EditPart's <i>visuals</i>. This method is called by
* {@link #refresh()}, and may also be called in response to notifications
* from the model.
*/
protected void refreshVisuals() {
BrokerMonitorFigure figure = (BrokerMonitorFigure) this.getFigure();
BrokerNode broker = (BrokerNode) this.getModel();
setMode2View(figure, broker);
BrokerDiagData dsr = broker.getBrokerDiagData();
if (dsr == null) {
figure.setSessionCount(0);
figure.setActiveSessionCount(0);
figure.setActiveSessionCount(0);
figure.setTps(0);
} else {
figure.setSessionCount(Integer.parseInt(dsr.getCas_mon_session()));
//Avoid looks like ActiveSessionCount larger then SessionCount
figure.setActiveSessionCount(Integer.parseInt(dsr.getCas_mon_session()));
figure.setActiveSessionCount(Integer.parseInt(dsr.getCas_mon_active()));
figure.setTps(Integer.parseInt(dsr.getCas_mon_tran()));
}
super.refreshVisuals();
}
use of com.cubrid.cubridmanager.ui.mondashboard.editor.figure.BrokerMonitorFigure in project cubrid-manager by CUBRID.
the class BrokerMonitorPart method createFigure.
/**
* get a database monitor figure.
*
* @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
* @return a database figure
*/
protected IFigure createFigure() {
BrokerMonitorFigure figure = new BrokerMonitorFigure();
BrokerNode broker = (BrokerNode) getModel();
setMode2View(figure, broker);
HostNode hostNode = broker.getParent();
figure.setHint(new StringBuffer(" ").append(broker.getBrokerName()).append("@").append(hostNode.getIp()).append(":").append(hostNode.getPort()).append(" ").toString());
return figure;
}
Aggregations