use of com.cubrid.common.ui.cubrid.table.dialog.exp.ExportMonitor in project cubrid-manager by CUBRID.
the class TableContentProvider method processStop.
/**
* process stop logic
*/
public void processStop() {
if (manager != null) {
if (!btnStop.isDisposed()) {
btnStop.setEnabled(false);
progressIndicator.done();
for (ExportMonitor po : tableList) {
if (po.getStatus() == ExportMonitor.STATUS_RUNNING) {
po.setStatus(ExportMonitor.STATUS_STOPED);
}
}
tvProgress.refresh(tableList);
}
stop = true;
manager.stopProcess();
}
}
use of com.cubrid.common.ui.cubrid.table.dialog.exp.ExportMonitor in project cubrid-manager by CUBRID.
the class TableContentProvider method updateOneTableData.
/**
* when one file finish ,update table
*
* @param evt FinishOneFileEvent
*/
private void updateOneTableData(ExportDataFinishOneTableEvent evt) {
if (stop) {
return;
}
String tableName = evt.getTableName();
for (int i = 0; i < tableList.size(); i++) {
ExportMonitor po = tableList.get(i);
if (po.getTableName().equals(tableName)) {
po.setStatus(ExportMonitor.STATUS_FINISHED);
po.setElapsedTime(evt.getEventTime() - po.getBeginTime());
tvProgress.refresh(tableList);
break;
}
}
}
use of com.cubrid.common.ui.cubrid.table.dialog.exp.ExportMonitor in project cubrid-manager by CUBRID.
the class TableContentProvider method updateTableData.
private void updateTableData(ExportDataEvent evt) {
if (stop) {
return;
}
String tableName = "";
int successCount = 1;
if (evt instanceof ExportDataSuccessEvent) {
ExportDataSuccessEvent event = (ExportDataSuccessEvent) evt;
tableName = event.getTableName();
successCount = event.getSuccessCount();
}
for (ExportMonitor po : tableList) {
if (po.getTableName().equals(tableName)) {
long oldParseCount = po.getParseCount();
po.setElapsedTime(evt.getEventTime() - po.getBeginTime());
po.setParseCount(oldParseCount + successCount);
po.setStatus(ExportMonitor.STATUS_RUNNING);
tvProgress.refresh(tableList);
break;
}
}
}
use of com.cubrid.common.ui.cubrid.table.dialog.exp.ExportMonitor in project cubrid-manager by CUBRID.
the class TableContentProvider method updateOneTableData.
/**
* when one file begin, update table
*
* @param evt BeginOneFileEvent
*/
private void updateOneTableData(ExportDataFailedOneTableEvent evt) {
if (stop) {
return;
}
String tableName = evt.getTableName();
for (int i = 0; i < tableList.size(); i++) {
ExportMonitor po = tableList.get(i);
if (po.getTableName().equals(tableName)) {
po.setBeginTime(evt.getEventTime());
po.setStatus(ExportMonitor.STATUS_FAILED);
tvProgress.refresh(tableList);
break;
}
}
}
use of com.cubrid.common.ui.cubrid.table.dialog.exp.ExportMonitor in project cubrid-manager by CUBRID.
the class ExportDataViewPart method processStop.
/**
* process stop logic
*/
public void processStop() {
if (manager != null) {
if (!btnStop.isDisposed()) {
btnStop.setEnabled(false);
progressIndicator.done();
for (ExportMonitor po : monitorList) {
if (po.getStatus() == ExportMonitor.STATUS_RUNNING) {
po.setStatus(ExportMonitor.STATUS_STOPED);
}
}
tvProgress.refresh(monitorList);
}
stop = true;
manager.stopProcess();
}
setHistroyWidgetStatus(true);
}
Aggregations