use of org.ovirt.engine.core.bll.tasks.CommandAsyncTask 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;
}
use of org.ovirt.engine.core.bll.tasks.CommandAsyncTask in project ovirt-engine by oVirt.
the class CommandMultiAsyncTasks method clearTasks.
public void clearTasks() {
synchronized (_listTasks) {
ArrayList<CommandAsyncTask> CurrentActionTypeTasks = getCurrentTasks();
for (CommandAsyncTask task : CurrentActionTypeTasks) {
if (task.getLastTaskStatus().getStatus() == AsyncTaskStatusEnum.finished) {
task.clearAsyncTask();
_listTasks.remove(task.getVdsmTaskId());
}
}
}
}
Aggregations