Package com.almis.awe.scheduler.service
Class SchedulerService
java.lang.Object
com.almis.awe.config.ServiceConfig
com.almis.awe.scheduler.service.SchedulerService
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
- Author:
- pgarcia
-
Constructor Summary
ConstructorDescriptionSchedulerService
(TaskDAO taskDAO, SchedulerDAO schedulerDAO, CalendarDAO calendarDAO, boolean isRemoteEnabled, boolean isSchedulerInstance) Constructor -
Method Summary
Modifier and TypeMethodDescriptionactivateCalendar
(List<Integer> calendarIdList) Resume the selected calendar Requires QUARTZcheckCalendarExist
(List<Integer> calendarIdList) Check if the scheduler contains the selected calendar Requires QUARTZClear all scheduled tasks and stop the scheduler.computeNextFireTimes
(Integer times, Schedule schedule) Compute next fire times Requires QUARTZGet currently executing jobs from the scheduler instance Requires QUARTZdeactivateCalendar
(List<Integer> calendarIdList) Pause the selected calendar Requires QUARTZdeleteSchedulerCalendar
(Integer calendarId) Delete a calendar from scheduler Requires QUARTZdeleteSchedulerCalendar
(List<Integer> calendarIdList) Delete selected calendars Requires QUARTZdeleteSchedulerTask
(Integer ideTsk) Delete a single task from scheduler Requires QUARTZdeleteSchedulerTask
(List<Integer> ideTsk) Delete a task from scheduler Requires QUARTZexecuteTaskNow
(Integer taskId, String user) Execute the selected task now Requires QUARTZGet configured Requires QUARTZgetExecutionsToPurge
(Integer taskId, Integer executions) Retrieve the executions to purgeReturns information about the configured scheduler Requires QUARTZgetTaskExecutionList
(Integer taskId) Retrieve the task progress status Requires LOG FILESgetTaskList
(TaskListCriteria taskListCriteria) Retrieve the task list Requires QUARTZinsertSchedulerCalendar
(Integer calendarIde) Insert and schedule a new calendar Requires QUARTZinsertSchedulerCalendar
(Integer calendarId, boolean replace, boolean updateTriggers) Insert and schedule a new calendar Requires QUARTZinsertSchedulerCalendar
(String alias, Integer calendarId, boolean replace, boolean updateTriggers) Insert and schedule a new calendar Requires QUARTZinsertSchedulerTask
(Integer taskId) Insert and schedule a new task Requires QUARTZloadExecutionScreen
(String path, com.fasterxml.jackson.databind.JsonNode address) Load execution screenloadMaintainVariables
(String maintainStr) Load needed variables from the selected maintainPause the selected task Requires QUARTZpurgeExecutionLogs
(Integer taskId, Integer executions) Purge execution logs Requires LOG FILESPurge execution logs on application start Requires LOG FILESreloadExecutionScreen
(Integer taskId, Integer executionId) Reload execution screenrestart()
Scheduler's emergency reboot method Requires QUARTZresumeTask
(Integer taskId) Resume the selected task Requires QUARTZstart()
Start the scheduler service Requires QUARTZStart the scheduler service Requires QUARTZStart the scheduler service Requires QUARTZstop()
Stop the scheduler service Requires QUARTZupdateExecutionTime
(Integer taskId, Integer taskExecution) Update execution timeupdateSchedulerCalendar
(Integer calendarId) Update and schedule a new calendar Requires QUARTZupdateSchedulerTask
(Integer taskId) Update and reschedule a task Requires QUARTZRetrieves next 100 yearsMethods inherited from class com.almis.awe.config.ServiceConfig
containsBean, getApplicationContext, getBean, getBean, getElements, getLocale, getLocale, getProperty, getProperty, getRequest, getSession, setApplicationContext
-
Constructor Details
-
SchedulerService
public SchedulerService(TaskDAO taskDAO, SchedulerDAO schedulerDAO, CalendarDAO calendarDAO, boolean isRemoteEnabled, boolean isSchedulerInstance) Constructor
-
-
Method Details
-
startOnInit
Start the scheduler service Requires QUARTZ- Throws:
AWException
- Error starting scheduler
-
start
Start the scheduler service Requires QUARTZ- Throws:
AWException
- Error starting scheduler
-
startNoQuartz
Start the scheduler service Requires QUARTZ- Throws:
AWException
- Error starting scheduler
-
stop
Stop the scheduler service Requires QUARTZ- Throws:
AWException
- Error stopping scheduler
-
restart
Scheduler's emergency reboot method Requires QUARTZ- Throws:
AWException
- Error restarting scheduler
-
clearAndStop
Clear all scheduled tasks and stop the scheduler. Requires QUARTZ- Returns:
- Service data
- Throws:
AWException
-
currentlyExecutingJobs
Get currently executing jobs from the scheduler instance Requires QUARTZ- Returns:
- Service data
- Throws:
AWException
- Error retrieving currently executing jobs
-
getConfiguredJobs
Get configured Requires QUARTZ- Returns:
- Configured jobs
- Throws:
AWException
- Error retrieving configured jobs
-
getSchedulerMetadata
Returns information about the configured scheduler Requires QUARTZ- Returns:
- Scheduler metadata
- Throws:
AWException
- Error retrieving scheduler metadata
-
getTaskList
Retrieve the task list Requires QUARTZ- Returns:
- ServiceData
- Throws:
AWException
- Error retrieving task list
-
getTaskExecutionList
Retrieve the task progress status Requires LOG FILES- Returns:
- ServiceData
- Throws:
AWException
- Error retrieving task execution list
-
getExecutionsToPurge
Retrieve the executions to purge- Returns:
- ServiceData
- Throws:
AWException
- Error retrieving executions to purge
-
executeTaskNow
Execute the selected task now Requires QUARTZ- Parameters:
taskId
- Task identifier- Returns:
- ServiceData
- Throws:
AWException
- Error executing task
-
pauseTask
Pause the selected task Requires QUARTZ- Parameters:
taskId
- Task identifier- Returns:
- ServiceData
- Throws:
AWException
- Error pausing task
-
resumeTask
Resume the selected task Requires QUARTZ- Parameters:
taskId
- Task identifier- Returns:
- ServiceData
- Throws:
AWException
- Error resuming task
-
insertSchedulerTask
Insert and schedule a new task Requires QUARTZ- Parameters:
taskId
- Task identifier- Returns:
- ServiceData
- Throws:
AWException
- Error inserting task
-
updateSchedulerTask
Update and reschedule a task Requires QUARTZ- Parameters:
taskId
- Task identifier list- Returns:
- ServiceData
- Throws:
AWException
- Error updating task
-
deleteSchedulerTask
Delete a task from scheduler Requires QUARTZ- Parameters:
ideTsk
- Task identifier list- Returns:
- ServiceData
- Throws:
AWException
- Error deleting task
-
deleteSchedulerTask
Delete a single task from scheduler Requires QUARTZ- Parameters:
ideTsk
- Task identifier list- Returns:
- ServiceData
- Throws:
AWException
- Error deleting task
-
updateExecutionTime
Update execution time- Parameters:
taskId
- Task identifier list- Returns:
- ServiceData
- Throws:
AWException
- Error updating execution time
-
loadMaintainVariables
Load needed variables from the selected maintain- Parameters:
maintainStr
- Maintain identifier- Returns:
- ServiceData
- Throws:
AWException
- Error loading maintain variables
-
loadExecutionScreen
public ServiceData loadExecutionScreen(String path, com.fasterxml.jackson.databind.JsonNode address) throws AWException Load execution screen- Parameters:
path
- Execution pathaddress
- Execution address- Returns:
- Service data
- Throws:
AWException
- Error loading execution screen
-
reloadExecutionScreen
Reload execution screen- Parameters:
taskId
- Task identifierexecutionId
- Execution identifier- Returns:
- Service data
- Throws:
AWException
- Error reloading execution screen
-
purgeExecutionLogs
Purge execution logs Requires LOG FILES- Parameters:
taskId
- Task identifierexecutions
- Number of executions to purge- Returns:
- Service data
- Throws:
AWException
- Error purging execution logs
-
purgeExecutionsAtStart
Purge execution logs on application start Requires LOG FILES- Returns:
- Service data
- Throws:
AWException
- Error purging executions
-
deactivateCalendar
Pause the selected calendar Requires QUARTZ- Parameters:
calendarIdList
- Calendar identifier list- Returns:
- ServiceData
- Throws:
AWException
- Error deactivating calendars
-
activateCalendar
Resume the selected calendar Requires QUARTZ- Parameters:
calendarIdList
- Calendar identifier list- Returns:
- ServiceData
- Throws:
AWException
- Error activating calendars
-
checkCalendarExist
Check if the scheduler contains the selected calendar Requires QUARTZ- Parameters:
calendarIdList
- Calendar identifier list- Returns:
- ServiceData
- Throws:
AWException
- Error checking calendars existence
-
insertSchedulerCalendar
Insert and schedule a new calendar Requires QUARTZ- Parameters:
calendarIde
- Calendar identifier- Returns:
- ServiceData
- Throws:
AWException
- Error inserting scheduler calendar
-
insertSchedulerCalendar
public ServiceData insertSchedulerCalendar(Integer calendarId, boolean replace, boolean updateTriggers) throws AWException Insert and schedule a new calendar Requires QUARTZ- Parameters:
calendarId
- Calendar identifierreplace
- Replace calendarupdateTriggers
- Update task triggers- Returns:
- ServiceData
- Throws:
AWException
- Error inserting scheduler calendar
-
insertSchedulerCalendar
public ServiceData insertSchedulerCalendar(String alias, Integer calendarId, boolean replace, boolean updateTriggers) throws AWException Insert and schedule a new calendar Requires QUARTZ- Parameters:
calendarId
- Calendar identifierreplace
- Replace calendarupdateTriggers
- Update task triggersalias
- Calendar alias- Returns:
- ServiceData
- Throws:
AWException
- Error inserting scheduler calendar
-
updateSchedulerCalendar
Update and schedule a new calendar Requires QUARTZ- Parameters:
calendarId
- Calendar identifier- Returns:
- ServiceData
- Throws:
AWException
- Error updating scheduler calendar
-
deleteSchedulerCalendar
Delete selected calendars Requires QUARTZ- Parameters:
calendarIdList
- Calendar identifier list- Returns:
- ServiceData
- Throws:
AWException
- Error deleting scheduler calendars
-
deleteSchedulerCalendar
Delete a calendar from scheduler Requires QUARTZ- Parameters:
calendarId
- Calendar identifier- Returns:
- ServiceData
- Throws:
AWException
- Error deleting scheduler calendar
-
yearSelectService
Retrieves next 100 years- Returns:
- ServiceData
-
computeNextFireTimes
Compute next fire times Requires QUARTZ- Parameters:
times
- # of fire times to computeschedule
- Schedule- Returns:
- Service data
- Throws:
AWException
- Error computing next fire times
-