Class SmartExecutorTask
- java.lang.Object
-
- org.gcube.vremanagement.executor.scheduler.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 Summary
Fields Modifier and Type Field Description protected intexecutionCountprotected static Map<UUID,Integer>executionsCountprotected static Map<UUID,Map<Integer,org.gcube.vremanagement.executor.plugin.PluginState>>executionsStateprotected booleaninitializedprotected Map<String,Object>inputsprotected Booleaninterruptedstatic StringLAUNCH_PARAMETERprotected org.gcube.vremanagement.executor.api.types.LaunchParameterlaunchParameterprotected intmaxExecutionNumberprotected booleanmustPreviousExecutionsCompletedprotected org.gcube.vremanagement.executor.plugin.Pluginpluginprotected StringpluginNameprotected List<org.gcube.vremanagement.executor.plugin.PluginStateNotification>pluginStateNotificationsprotected RunnablePlugin<org.gcube.vremanagement.executor.plugin.Plugin>runnablePluginprotected Stringtokenstatic StringTOKENprotected UUIDuuidstatic StringUUID
-
Constructor Summary
Constructors Constructor Description SmartExecutorTask()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(org.quartz.JobExecutionContext context)protected voidfinished(org.quartz.JobExecutionContext context)static Map<UUID,Integer>getExecutionsCount()org.gcube.vremanagement.executor.api.types.LaunchParametergetLaunchParameter()UUIDgetUUID()protected voidinit(org.quartz.JobDataMap jobDataMap)voidinterrupt()protected booleanisMaxExecutionNumberReached()StringtoString()protected voidunschedule(boolean globally)
-
-
-
Field Detail
-
UUID
public static final String UUID
- See Also:
- Constant Field Values
-
LAUNCH_PARAMETER
public static final String LAUNCH_PARAMETER
- See Also:
- Constant Field Values
-
TOKEN
public static final String TOKEN
- See Also:
- Constant Field Values
-
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
-
-
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:
executein interfaceorg.quartz.Job- Throws:
org.quartz.JobExecutionException
-
finished
protected void finished(org.quartz.JobExecutionContext context)
-
interrupt
public void interrupt() throws org.quartz.UnableToInterruptJobException- Specified by:
interruptin interfaceorg.quartz.InterruptableJob- Throws:
org.quartz.UnableToInterruptJobException
-
isMaxExecutionNumberReached
protected boolean isMaxExecutionNumberReached()
-
-