use of com.cubrid.cubridmanager.core.common.task.SetHAConfParameterTask in project cubrid-manager by CUBRID.
the class HAPropertyPage method perform.
/**
*
* Perform task and set parameter to cm.conf
*
* @param confParaMap the conf parameters map
*/
private void perform(Map<String, Map<String, String>> confParaMap) {
CommonTaskExec taskExcutor = new CommonTaskExec(Messages.setHAConfTaskName);
SetHAConfParameterTask task = new SetHAConfParameterTask(node.getServer().getServerInfo());
task.setConfParameters(confParaMap);
taskExcutor.addTask(task);
new ExecTaskWithProgress(taskExcutor).exec(true, true);
if (taskExcutor.isSuccess()) {
CommonUITool.openInformationBox(Messages.titleSuccess, Messages.msgSetHAConfSuccess);
}
}
use of com.cubrid.cubridmanager.core.common.task.SetHAConfParameterTask in project cubrid-manager by CUBRID.
the class ConfigHAWizard method performFinish.
public boolean performFinish() {
ServerInfo masterServerInfo = haModel.getMasterServer().getServer().getServerInfo();
ServerInfo slaveServerInfo = haModel.getSlaveServer().getServer().getServerInfo();
Map<String, Map<String, String>> masterParams = haModel.getMasterServer().getCubridParameters();
Map<String, Map<String, String>> slaveParams = haModel.getSlaveServer().getCubridParameters();
Map<String, Map<String, String>> masterHaParams = haModel.getMasterServer().getCubridHAParameters();
Map<String, Map<String, String>> slaveHaParams = haModel.getSlaveServer().getCubridHAParameters();
setCubridConfParameterTaskMaster = new SetCubridConfParameterTask(masterServerInfo);
setCubridConfParameterTaskMaster.setConfParameters(masterParams);
setHAConfParameterTaskMaster = new SetHAConfParameterTask(masterServerInfo);
setHAConfParameterTaskMaster.setConfParameters(masterHaParams);
setCubridConfParameterTaskSlave = new SetCubridConfParameterTask(slaveServerInfo);
setCubridConfParameterTaskSlave.setConfParameters(slaveParams);
setHAConfParameterTaskSlave = new SetHAConfParameterTask(slaveServerInfo);
setHAConfParameterTaskSlave.setConfParameters(slaveHaParams);
CommonTaskExec taskExec = new CommonTaskExec(Messages.msgUploading);
taskExec.addTask(setCubridConfParameterTaskMaster);
taskExec.addTask(setCubridConfParameterTaskSlave);
taskExec.addTask(setHAConfParameterTaskMaster);
taskExec.addTask(setHAConfParameterTaskSlave);
new ExecTaskWithProgress(taskExec).exec();
if (taskExec.isSuccess()) {
StartHAServiceDialog dialog = new StartHAServiceDialog(getShell(), haModel);
dialog.open();
return true;
} else {
CommonUITool.openErrorBox(getErrMsg());
return false;
}
}
use of com.cubrid.cubridmanager.core.common.task.SetHAConfParameterTask in project cubrid-manager by CUBRID.
the class ConfigParaHelp method performImportHAConf.
/**
* Perform the import task for ha.conf
*
* @param serverInfo the CubridServer
* @param confParamList the List<String>
*/
public static void performImportHAConf(ServerInfo serverInfo, List<String> confParamList) {
CommonTaskExec taskExcutor = new CommonTaskExec(Messages.setHAConfTaskName);
SetHAConfParameterTask task = new SetHAConfParameterTask(serverInfo);
task.setConfContents(confParamList);
taskExcutor.addTask(task);
new ExecTaskWithProgress(taskExcutor).busyCursorWhile();
if (taskExcutor.isSuccess()) {
CommonUITool.openInformationBox(Messages.titleSuccess, Messages.msgSetHAConfSuccess);
}
}
Aggregations