use of com.cubrid.cubridmanager.core.cubrid.database.model.transaction.KillTransactionList in project cubrid-manager by CUBRID.
the class CommonQueryTaskTest method testTask.
public void testTask() {
CommonQueryTask<StandbyServerStat> standbyServerStatTask = new CommonQueryTask<StandbyServerStat>(serverInfo, CommonSendMsg.getCommonDatabaseSendMsg(), new StandbyServerStat(), "UTF-8");
standbyServerStatTask.setDbName(testDbName);
standbyServerStatTask.setDbid(dbaUserName);
standbyServerStatTask.setDbpasswd(dbaPassword);
standbyServerStatTask.execute();
standbyServerStatTask.getResultModel();
CommonQueryTask<BrokerDiagData> brokerDiagDataTask = new CommonQueryTask<BrokerDiagData>(serverInfo, CommonSendMsg.getGetBrokerStatusItems(), new BrokerDiagData());
brokerDiagDataTask.setBName("query_editor");
brokerDiagDataTask.execute();
brokerDiagDataTask.getResultModel();
brokerDiagDataTask.setBroker("query_editor");
CommonQueryTask<KillTransactionList> task = new CommonQueryTask<KillTransactionList>(serverInfo, CommonSendMsg.getKillTransactionMSGItems(), new KillTransactionList());
task.setDbName(testDbName);
task.setKillTranType(KillTranType.H);
task.setKillTranParameter("localhost");
}
use of com.cubrid.cubridmanager.core.cubrid.database.model.transaction.KillTransactionList in project cubrid-manager by CUBRID.
the class TransactionInfoDialog method killTransaction.
/**
*
* Kill the transaction
*
* @param type the transaction type
* @param parameter the parameter
*/
private void killTransaction(KillTranType type, String parameter) {
CommonQueryTask<KillTransactionList> task = new CommonQueryTask<KillTransactionList>(database.getServer().getServerInfo(), CommonSendMsg.getKillTransactionMSGItems(), new KillTransactionList());
task.setDbName(database.getName());
task.setKillTranType(type);
task.setKillTranParameter(parameter);
execTask(-1, new SocketTask[] { task }, true, getShell());
if (task.getErrorMsg() != null) {
return;
}
CommonUITool.openInformationBox(parentComp.getShell(), Messages.titleSuccess, Messages.msgKillSuccess);
KillTransactionList killTransactionList = task.getResultModel();
DbTransactionList dbDbTransactionList = new DbTransactionList();
dbDbTransactionList.setTransationInfo(killTransactionList.getTransationInfo());
setDbTransactionList(dbDbTransactionList);
}
use of com.cubrid.cubridmanager.core.cubrid.database.model.transaction.KillTransactionList in project cubrid-manager by CUBRID.
the class KillTransactionDialog method killTransaction.
/**
*
* Kill the transaction
*
* @param type the transaction type
* @param parameter the parameter
*/
private void killTransaction(KillTranType type, String parameter) {
CommonQueryTask<KillTransactionList> task = new CommonQueryTask<KillTransactionList>(database.getServer().getServerInfo(), CommonSendMsg.getKillTransactionMSGItems(), new KillTransactionList());
task.setDbName(database.getName());
task.setKillTranType(type);
task.setKillTranParameter(parameter);
executeKillTrans(-1, new SocketTask[] { task }, true, getShell());
if (task.getErrorMsg() != null) {
isSuccess = false;
return;
}
isSuccess = true;
CommonUITool.openInformationBox(parentComp.getShell(), Messages.titleSuccess, Messages.msgKillSuccess);
killTransactionList = task.getResultModel();
}
Aggregations