Search in sources :

Example 1 with EndedTasksInfo

use of org.ovirt.engine.core.common.asynctasks.EndedTasksInfo in project ovirt-engine by oVirt.

the class CommandMultiAsyncTasks method getEndedTasksInfo.

public EndedTasksInfo getEndedTasksInfo() {
    EndedTasksInfo endedTasksInfo = new EndedTasksInfo();
    ArrayList<EndedTaskInfo> endedTaskInfoList = new ArrayList<>();
    synchronized (_listTasks) {
        ArrayList<CommandAsyncTask> CurrentActionTypeTasks = getCurrentTasks();
        for (CommandAsyncTask task : CurrentActionTypeTasks) {
            task.setLastStatusAccessTime();
            EndedTaskInfo tempVar = new EndedTaskInfo();
            tempVar.setTaskStatus(task.getLastTaskStatus());
            tempVar.setTaskParameters(task.getParameters());
            endedTaskInfoList.add(tempVar);
        }
        endedTasksInfo.setTasksInfo(endedTaskInfoList);
    }
    return endedTasksInfo;
}
Also used : CommandAsyncTask(org.ovirt.engine.core.bll.tasks.CommandAsyncTask) EndedTasksInfo(org.ovirt.engine.core.common.asynctasks.EndedTasksInfo) ArrayList(java.util.ArrayList) EndedTaskInfo(org.ovirt.engine.core.common.asynctasks.EndedTaskInfo)

Aggregations

ArrayList (java.util.ArrayList)1 CommandAsyncTask (org.ovirt.engine.core.bll.tasks.CommandAsyncTask)1 EndedTaskInfo (org.ovirt.engine.core.common.asynctasks.EndedTaskInfo)1 EndedTasksInfo (org.ovirt.engine.core.common.asynctasks.EndedTasksInfo)1