Search in sources :

Example 1 with KillTransactionList

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");
}
Also used : KillTransactionList(com.cubrid.cubridmanager.core.cubrid.database.model.transaction.KillTransactionList) BrokerDiagData(com.cubrid.cubridmanager.core.monitoring.model.BrokerDiagData) StandbyServerStat(com.cubrid.cubridmanager.core.mondashboard.model.StandbyServerStat)

Example 2 with KillTransactionList

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);
}
Also used : DbTransactionList(com.cubrid.cubridmanager.core.cubrid.database.model.transaction.DbTransactionList) KillTransactionList(com.cubrid.cubridmanager.core.cubrid.database.model.transaction.KillTransactionList) CommonQueryTask(com.cubrid.cubridmanager.core.common.task.CommonQueryTask)

Example 3 with KillTransactionList

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();
}
Also used : KillTransactionList(com.cubrid.cubridmanager.core.cubrid.database.model.transaction.KillTransactionList) CommonQueryTask(com.cubrid.cubridmanager.core.common.task.CommonQueryTask)

Aggregations

KillTransactionList (com.cubrid.cubridmanager.core.cubrid.database.model.transaction.KillTransactionList)3 CommonQueryTask (com.cubrid.cubridmanager.core.common.task.CommonQueryTask)2 DbTransactionList (com.cubrid.cubridmanager.core.cubrid.database.model.transaction.DbTransactionList)1 StandbyServerStat (com.cubrid.cubridmanager.core.mondashboard.model.StandbyServerStat)1 BrokerDiagData (com.cubrid.cubridmanager.core.monitoring.model.BrokerDiagData)1