Class SmartExecutorTask

  • All Implemented Interfaces:
    org.quartz.InterruptableJob, org.quartz.Job

    public class SmartExecutorTask
    extends Object
    implements org.quartz.InterruptableJob
    Author:
    Luca Frosini (ISTI - CNR)
    • Field Detail

      • executionsCount

        protected static Map<UUID,​Integer> executionsCount
      • executionsState

        protected static Map<UUID,​Map<Integer,​org.gcube.vremanagement.executor.plugin.PluginState>> executionsState
      • pluginStateNotifications

        protected List<org.gcube.vremanagement.executor.plugin.PluginStateNotification> pluginStateNotifications
      • initialized

        protected boolean initialized
      • uuid

        protected UUID uuid
      • launchParameter

        protected org.gcube.vremanagement.executor.api.types.LaunchParameter launchParameter
      • token

        protected String token
      • executionCount

        protected int executionCount
      • pluginName

        protected String pluginName
      • plugin

        protected org.gcube.vremanagement.executor.plugin.Plugin plugin
      • runnablePlugin

        protected RunnablePlugin<org.gcube.vremanagement.executor.plugin.Plugin> runnablePlugin
      • mustPreviousExecutionsCompleted

        protected boolean mustPreviousExecutionsCompleted
      • maxExecutionNumber

        protected int maxExecutionNumber
      • interrupted

        protected Boolean interrupted
    • Constructor Detail

    • Method Detail

      • getExecutionsCount

        public static Map<UUID,​Integer> getExecutionsCount()
        Returns:
        the executionsCount
      • init

        protected void init​(org.quartz.JobDataMap jobDataMap)
                     throws org.quartz.JobExecutionException
        Throws:
        org.quartz.JobExecutionException
      • getUUID

        public UUID getUUID()
        Returns:
        the uuid
      • getLaunchParameter

        public org.gcube.vremanagement.executor.api.types.LaunchParameter getLaunchParameter()
        Returns:
        the parameter
      • execute

        public void execute​(org.quartz.JobExecutionContext context)
                     throws org.quartz.JobExecutionException
        Specified by:
        execute in interface org.quartz.Job
        Throws:
        org.quartz.JobExecutionException
      • finished

        protected void finished​(org.quartz.JobExecutionContext context)
      • interrupt

        public void interrupt()
                       throws org.quartz.UnableToInterruptJobException
        Specified by:
        interrupt in interface org.quartz.InterruptableJob
        Throws:
        org.quartz.UnableToInterruptJobException
      • isMaxExecutionNumberReached

        protected boolean isMaxExecutionNumberReached()
      • unschedule

        protected void unschedule​(boolean globally)
                           throws Exception
        Throws:
        Exception