Class RemoteSchedulerService

java.lang.Object
com.almis.awe.config.ServiceConfig
com.almis.awe.scheduler.service.RemoteSchedulerService
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class RemoteSchedulerService extends ServiceConfig
Author:
pgarcia
  • Constructor Details

    • RemoteSchedulerService

      public RemoteSchedulerService(SchedulerService schedulerService, RemoteScheduler remoteScheduler, com.fasterxml.jackson.databind.ObjectMapper mapper, boolean remote)
      Constructor
  • Method Details

    • getTaskList

      public ServiceData getTaskList() throws AWException
      Retrieve the task list from service Requires QUARTZ
      Returns:
      ServiceData
      Throws:
      AWException - Error retrieving task list
    • computeNextFireTimes

      public ServiceData computeNextFireTimes(Integer times) throws AWException
      Compute next fire times Requires QUARTZ
      Parameters:
      times - # of fire times to compute
      Returns:
      Service data
      Throws:
      AWException - Error computing next fire times
    • getTaskExecutionList

      public ServiceData getTaskExecutionList(Integer taskId) throws AWException
      Retrieve the task progress status Requires LOG FILES
      Returns:
      ServiceData
      Throws:
      AWException - Error retrieving task execution list
    • pauseTask

      public ServiceData pauseTask(Integer taskId) throws AWException
      Pause the selected task Requires QUARTZ
      Parameters:
      taskId - Task identifier
      Returns:
      ServiceData
      Throws:
      AWException - Error pausing task
    • resumeTask

      public ServiceData resumeTask(Integer taskId) throws AWException
      Resume the selected task Requires QUARTZ
      Parameters:
      taskId - Task identifier
      Returns:
      ServiceData
      Throws:
      AWException - Error resuming task
    • executeTaskNow

      public ServiceData executeTaskNow(Integer taskId, String user) throws AWException
      Execute the selected task now Requires QUARTZ
      Parameters:
      taskId - Task identifier
      Returns:
      ServiceData
      Throws:
      AWException - Error executing task
    • insertSchedulerTask

      public ServiceData insertSchedulerTask(Integer taskId) throws AWException
      Insert and schedule a new task Requires QUARTZ
      Parameters:
      taskId - Task identifier
      Returns:
      ServiceData
      Throws:
      AWException - Error inserting task
    • updateSchedulerTask

      public ServiceData updateSchedulerTask(Integer taskId) throws AWException
      Update and reschedule a task Requires QUARTZ
      Parameters:
      taskId - Task identifier list
      Returns:
      ServiceData
      Throws:
      AWException - Error updating task
    • deleteSchedulerTask

      public ServiceData deleteSchedulerTask(List<Integer> ideTsk) throws AWException
      Delete a task from scheduler Requires QUARTZ
      Parameters:
      ideTsk - Task identifier list
      Returns:
      ServiceData
      Throws:
      AWException - Error deleting task
    • purgeExecutionLogs

      public ServiceData purgeExecutionLogs(Integer taskId, Integer executions) throws AWException
      Purge execution logs Requires LOG FILES
      Parameters:
      taskId - Task identifier
      executions - Number of executions to purge
      Returns:
      Service data
      Throws:
      AWException - Error purging execution logs
    • currentlyExecutingJobs

      public ServiceData currentlyExecutingJobs() throws AWException
      Get currently executing jobs from the scheduler instance Requires QUARTZ
      Returns:
      Service data
      Throws:
      AWException - Error retrieving currently executing jobs
    • getConfiguredJobs

      public ServiceData getConfiguredJobs() throws AWException
      Get configured Requires QUARTZ
      Returns:
      Configured jobs
      Throws:
      AWException - Error retrieving configured jobs
    • insertSchedulerCalendar

      public ServiceData insertSchedulerCalendar(Integer calendarIde) throws AWException
      Insert and schedule a new calendar Requires QUARTZ
      Parameters:
      calendarIde - Calendar identifier
      Returns:
      ServiceData
      Throws:
      AWException - Error inserting scheduler calendar
    • updateSchedulerCalendar

      public ServiceData updateSchedulerCalendar(Integer calendarId) throws AWException
      Update and schedule a new calendar Requires QUARTZ
      Parameters:
      calendarId - Calendar identifier
      Returns:
      ServiceData
      Throws:
      AWException - Error updating scheduler calendar
    • deleteSchedulerCalendar

      public ServiceData deleteSchedulerCalendar(List<Integer> calendarIdList) throws AWException
      Delete selected calendars Requires QUARTZ
      Parameters:
      calendarIdList - Calendar identifier list
      Returns:
      ServiceData
      Throws:
      AWException - Error deleting scheduler calendars
    • checkCalendarExist

      public ServiceData checkCalendarExist(List<Integer> calendarIdList) throws AWException
      Check if the scheduler contains the selected calendar Requires QUARTZ
      Parameters:
      calendarIdList - Calendar identifier list
      Returns:
      ServiceData
      Throws:
      AWException - Error checking calendars existence
    • activateCalendar

      public ServiceData activateCalendar(List<Integer> calendarIdList) throws AWException
      Resume the selected calendar Requires QUARTZ
      Parameters:
      calendarIdList - Calendar identifier list
      Returns:
      ServiceData
      Throws:
      AWException - Error activating calendars
    • deactivateCalendar

      public ServiceData deactivateCalendar(List<Integer> calendarIdList) throws AWException
      Pause the selected calendar Requires QUARTZ
      Parameters:
      calendarIdList - Calendar identifier list
      Returns:
      ServiceData
      Throws:
      AWException - Error deactivating calendars
    • start

      public ServiceData start() throws AWException
      Start the scheduler service Requires QUARTZ
      Throws:
      AWException - Error starting scheduler
    • stop

      public ServiceData stop() throws AWException
      Stop the scheduler service Requires QUARTZ
      Throws:
      AWException - Error stopping scheduler
    • restart

      public ServiceData restart() throws AWException
      Scheduler's emergency reboot method Requires QUARTZ
      Throws:
      AWException - Error restarting scheduler
    • clearAndStop

      public ServiceData clearAndStop() throws AWException
      Clear all scheduled tasks and stop the scheduler. Requires QUARTZ
      Returns:
      Service data
      Throws:
      AWException
    • getSchedulerMetadata

      public ServiceData getSchedulerMetadata() throws AWException
      Returns information about the configured scheduler Requires QUARTZ
      Returns:
      Scheduler metadata
      Throws:
      AWException - Error retrieving scheduler metadata