Search in sources :

Example 1 with GetCasLogTopResultTask

use of com.cubrid.cubridmanager.core.logs.task.GetCasLogTopResultTask in project cubrid-manager by CUBRID.

the class SqlLogAnalyzeResultDialog method connect.

/**
	 * each page of log connect
	 *
	 * @param qindex String
	 * @param queryString StringBuffer
	 * @return queryString
	 */
public StringBuilder connect(String qindex, StringBuilder queryString) {
    final GetCasLogTopResultTask task = new GetCasLogTopResultTask(node.getServer().getServerInfo());
    task.setFileName(resultFile);
    task.setQindex(qindex);
    TaskExecutor taskExecutor = new CommonTaskExec(Messages.loadLogTaskName);
    taskExecutor.addTask(task);
    new ExecTaskWithProgress(taskExecutor).exec();
    if (taskExecutor.isSuccess() && task.getAnalyzeCasLogTopResultList() != null) {
        AnalyzeCasLogTopResultInfo resultInfo = (AnalyzeCasLogTopResultInfo) task.getAnalyzeCasLogTopResultList();
        if (resultInfo != null && resultInfo.getLogString() != null) {
            for (String logString : resultInfo.getLogString()) {
                queryString.append(logString + "\n");
            }
        }
    }
    return queryString;
}
Also used : CommonTaskExec(com.cubrid.common.ui.spi.progress.CommonTaskExec) TaskExecutor(com.cubrid.common.ui.spi.progress.TaskExecutor) ExecTaskWithProgress(com.cubrid.common.ui.spi.progress.ExecTaskWithProgress) AnalyzeCasLogTopResultInfo(com.cubrid.cubridmanager.core.logs.model.AnalyzeCasLogTopResultInfo) GetCasLogTopResultTask(com.cubrid.cubridmanager.core.logs.task.GetCasLogTopResultTask)

Aggregations

CommonTaskExec (com.cubrid.common.ui.spi.progress.CommonTaskExec)1 ExecTaskWithProgress (com.cubrid.common.ui.spi.progress.ExecTaskWithProgress)1 TaskExecutor (com.cubrid.common.ui.spi.progress.TaskExecutor)1 AnalyzeCasLogTopResultInfo (com.cubrid.cubridmanager.core.logs.model.AnalyzeCasLogTopResultInfo)1 GetCasLogTopResultTask (com.cubrid.cubridmanager.core.logs.task.GetCasLogTopResultTask)1