use of com.cubrid.cubridmanager.core.shard.task.ShardsTaskFactory in project cubrid-manager by CUBRID.
the class ShardParameterPropertyPage method performOk.
/**
* Save the page content
*
* @return <code>true</code> if it saved successfully;<code>false</code>
* otherwise
*/
public boolean performOk() {
shardParameterPanel.save();
ShardsTaskFactory taskFactory = new ShardsTaskFactory(this.serverInfo, this.shards);
taskFactory.addUpdateFile(this.shard, oldShardName);
CommonTaskExec taskExec = new CommonTaskExec(Messages.msgOperating);
taskExec.setTask(taskFactory.generateTasks());
new ExecTaskWithProgress(taskExec).exec();
if (taskExec.isSuccess()) {
CommonUITool.openInformationBox(Messages.titleSuccess, Messages.restartShardBrokerMsg);
return true;
} else {
CommonUITool.openErrorBox(Messages.msgOperationFailed);
return false;
}
}
use of com.cubrid.cubridmanager.core.shard.task.ShardsTaskFactory in project cubrid-manager by CUBRID.
the class AddShardWizard method performFinish.
/**
* Called when user clicks Finish
*
* @return boolean
*/
public boolean performFinish() {
ShardsTaskFactory taskFactory = new ShardsTaskFactory(this.server.getServerInfo(), this.shards);
taskFactory.addUpdateFile(this.shard, null);
CommonTaskExec taskExec = new CommonTaskExec(Messages.msgUploading);
taskExec.setTask(taskFactory.generateTasks());
new ExecTaskWithProgress(taskExec).exec();
if (taskExec.isSuccess()) {
close();
return true;
} else {
CommonUITool.openErrorBox(Messages.errAddShardBroker);
return false;
}
}
Aggregations