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 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

      void setupTaskExecutionEnvironment(String taskId, String jobId, String type, String name, long startDate, String details, TaskExecutionStatus initialStatus)
    • updateStartDate

      void updateStartDate(String taskId, long startDate)
      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

      void delete(String taskId)
      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 to stoppedstopped, which are still running. Should only be called before the scheduler has been started.
    • updateTaskExecutionStatus

      void updateTaskExecutionStatus(String taskId, TaskExecutionStatus status)
      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

      ProgressBean createProgress(String taskId, String taskName)
      Create a new ProgressBean object.
      Parameters:
      taskId - The task id for the ProgressBean.
      taskName - The task name for ProgressBean.
      Returns:
      the created ProgressBean.
    • saveProgress

      void saveProgress(Progress progress)
      Save the given Progress.
      Parameters:
      progress - The progress to save.
    • getProgressOfRunningTasks

      List<ProgressBean> getProgressOfRunningTasks()
      Get progress of all running tasks.
      Returns:
      progress of all running tasks.
    • saveLogEntry

      void saveLogEntry(LogEntry logEntry)
      Save the given LogEntry.
      Parameters:
      logEntry - The log entry to save.
    • findLogEntryByState

      Optional<LogEntry> findLogEntryByState(String state)
      Find a single LogEntry for a given state value. This value must uniquely identify the log entry!

      If more than one result is found, an exception is thrown. Otherwise either the single result is returned or none.

    • findLatestLogEntry

      Optional<LogEntry> findLatestLogEntry(String taskId)