Interface ProgressPersistenceManager
- All Known Implementing Classes:
ProgressPersistenceManagerImpl
public interface ProgressPersistenceManager
This service provides methods to fetch and save Task_execution and Log_entry entities.
-
Method Summary
Modifier and TypeMethodDescriptioncreateProgress(String taskId, String taskName) Create a newProgressBeanobject.voidDelete a Task_execution entity.findLatestLogEntry(String taskId) findLogEntryByState(String state) Find a singleLogEntryfor a given state value.Get progress of all running tasks.voidsaveLogEntry(LogEntry logEntry) Save the givenLogEntry.voidsaveProgress(Progress progress) Save the givenProgress.default voidsetupTaskExecutionEnvironment(String taskId, String jobId, String type, String name, long startDate, String details) Create a Task_execution entity.voidsetupTaskExecutionEnvironment(String taskId, String jobId, String type, String name, long startDate, String details, TaskExecutionStatus initialStatus) voidSet all Task_execution entities tostoppedstopped, which are still running.voidupdateStartDate(String taskId, long startDate) Update the start date on the Task_execution entity with the given task id.voidupdateTaskExecutionStatus(String taskId, TaskExecutionStatus status) Update the status of the Task_execution entity with the given task id.
-
Method Details
-
setupTaskExecutionEnvironment
default void setupTaskExecutionEnvironment(String taskId, String jobId, String type, String name, long startDate, String details) Create a Task_execution entity.- Parameters:
taskId- The id of the task.type- The type of the task.name- The name of the task.startDate- The start date of the task.details- Detail informations.
-
setupTaskExecutionEnvironment
-
updateStartDate
Update the start date on the Task_execution entity with the given task id.- Parameters:
taskId- The task id of the Task_execution to modify.startDate- The new start date to set.
-
delete
Delete a Task_execution entity.- Parameters:
taskId- The task id of the Task_execution entity to delete.
-
stopUncompletedTaskExecutions
void stopUncompletedTaskExecutions()Set all Task_execution entities tostoppedstopped, which are still running. Should only be called before the scheduler has been started. -
updateTaskExecutionStatus
Update the status of the Task_execution entity with the given task id.- Parameters:
taskId- The task id of the Task_execution entity to update.status- The new status to set.
-
createProgress
Create a newProgressBeanobject.- Parameters:
taskId- The task id for the ProgressBean.taskName- The task name for ProgressBean.- Returns:
- the created ProgressBean.
-
saveProgress
-
getProgressOfRunningTasks
List<ProgressBean> getProgressOfRunningTasks()Get progress of all running tasks.- Returns:
- progress of all running tasks.
-
saveLogEntry
-
findLogEntryByState
-
findLatestLogEntry
-