Class SmartExecutorScheduler
java.lang.Object
org.gcube.vremanagement.executor.scheduler.SmartExecutorScheduler
- Author:
- Luca Frosini (ISTI - CNR)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.quartz.Scheduler -
Method Summary
Modifier and TypeMethodDescriptionprotected org.quartz.TriggerBuilder<? extends org.quartz.Trigger>createTriggerBuilder(UUID uuid, org.quartz.ScheduleBuilder<? extends org.quartz.Trigger> sb) protected List<org.quartz.JobExecutionContext>getCurrentlyExecutingJobs(org.quartz.Scheduler scheduler) org.gcube.vremanagement.executor.api.types.LaunchParametergetLaunchParameter(org.quartz.JobKey jobKey) protected org.quartz.TriggerBuilder<? extends org.quartz.Trigger>getTriggerBuilderWithScheduling(UUID uuid, org.gcube.vremanagement.executor.api.types.Scheduling scheduling) protected voidreallySchedule(UUID uuid, org.gcube.vremanagement.executor.api.types.LaunchParameter parameter, String ownerId) Create the Scheduler using the strategy provided by LaunchParameterschedule(org.gcube.vremanagement.executor.api.types.LaunchParameter parameter, UUID uuid, String ownerId) Schedule a task executionvoidStop the execution of the Task identified by UUIDvoidstopAll()protected void
-
Field Details
-
scheduledJobs
-
scheduler
protected org.quartz.Scheduler scheduler
-
-
Method Details
-
createTriggerBuilder
protected org.quartz.TriggerBuilder<? extends org.quartz.Trigger> createTriggerBuilder(UUID uuid, org.quartz.ScheduleBuilder<? extends org.quartz.Trigger> sb) -
getTriggerBuilderWithScheduling
protected org.quartz.TriggerBuilder<? extends org.quartz.Trigger> getTriggerBuilderWithScheduling(UUID uuid, org.gcube.vremanagement.executor.api.types.Scheduling scheduling) throws org.gcube.vremanagement.executor.exception.LaunchException - Throws:
org.gcube.vremanagement.executor.exception.LaunchException
-
reallySchedule
protected void reallySchedule(UUID uuid, org.gcube.vremanagement.executor.api.types.LaunchParameter parameter, String ownerId) throws org.gcube.vremanagement.executor.exception.LaunchException, org.quartz.SchedulerException Create the Scheduler using the strategy provided by LaunchParameter- Parameters:
uuid- the UUID will be used to identify the taskparameter- LaunchParameter requested in service invocation- Throws:
org.gcube.vremanagement.executor.exception.LaunchException- if the LaunchParameter does not contains a valid scheduling strategyorg.quartz.SchedulerException- if the scheduler cannot be created by the scheduler factory
-
schedule
public UUID schedule(org.gcube.vremanagement.executor.api.types.LaunchParameter parameter, UUID uuid, String ownerId) throws org.gcube.vremanagement.executor.exception.InputsNullException, org.gcube.vremanagement.executor.exception.PluginNotFoundException, org.gcube.vremanagement.executor.exception.LaunchException Schedule a task execution- Parameters:
parameter- LaunchParameter requested in service invocation- Returns:
- the UUID which will identify the task
- Throws:
org.gcube.vremanagement.executor.exception.LaunchException- if the LaunchParameter does not contains a valid scheduling strategyorg.gcube.vremanagement.executor.exception.InputsNullException- if provided input map is nullorg.gcube.vremanagement.executor.exception.PluginNotFoundException- if the request plugin is not available on this smart executor instance
-
stopTask
protected void stopTask(UUID uuid) throws org.gcube.vremanagement.executor.exception.UnableToInterruptTaskException - Throws:
org.gcube.vremanagement.executor.exception.UnableToInterruptTaskException
-
getCurrentlyExecutingJobs
protected List<org.quartz.JobExecutionContext> getCurrentlyExecutingJobs(org.quartz.Scheduler scheduler) throws org.quartz.SchedulerException - Throws:
org.quartz.SchedulerException
-
getLaunchParameter
public org.gcube.vremanagement.executor.api.types.LaunchParameter getLaunchParameter(org.quartz.JobKey jobKey) throws org.quartz.SchedulerException - Throws:
org.quartz.SchedulerException
-
stop
Stop the execution of the Task identified by UUID- Parameters:
uuid- which identify the Taskremove- : when the Task is a Scheduled one indicate if the Task has to be released or to be removed (the argument is set to true when an explicit request arrive to remove the scheduled task)- Throws:
ExceptionSchedulerNotFoundException
-
stopAll
public void stopAll() throws org.quartz.SchedulerException- Throws:
org.quartz.SchedulerException
-