Class TaskRunningServiceImpl
- java.lang.Object
-
- ubic.gemma.core.job.executor.webapp.TaskRunningServiceImpl
-
- All Implemented Interfaces:
DisposableBean
,TaskRunningService
@Component public class TaskRunningServiceImpl extends Object implements TaskRunningService, DisposableBean
Handles the execution of tasks in threads that can be checked by clients later.- Author:
- pavlidis
-
-
Constructor Summary
Constructors Constructor Description TaskRunningServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
SubmittedTask
getSubmittedTask(String taskId)
Collection<SubmittedTask>
getSubmittedTasks()
<T extends Task<?>>
StringsubmitTask(T task)
<C extends TaskCommand>
StringsubmitTaskCommand(C taskCommand)
We check if there are listeners on task submission queue to decide if remote tasks can be served.
-
-
-
Method Detail
-
destroy
public void destroy() throws Exception
- Specified by:
destroy
in interfaceDisposableBean
- Throws:
Exception
-
getSubmittedTask
public SubmittedTask getSubmittedTask(String taskId)
- Specified by:
getSubmittedTask
in interfaceTaskRunningService
-
getSubmittedTasks
public Collection<SubmittedTask> getSubmittedTasks()
- Specified by:
getSubmittedTasks
in interfaceTaskRunningService
- Returns:
- the submittedTasks
-
submitTask
public <T extends Task<?>> String submitTask(T task)
- Specified by:
submitTask
in interfaceTaskRunningService
-
submitTaskCommand
public <C extends TaskCommand> String submitTaskCommand(C taskCommand)
We check if there are listeners on task submission queue to decide if remote tasks can be served.- Specified by:
submitTaskCommand
in interfaceTaskRunningService
- Type Parameters:
C
- task command implementation- Parameters:
taskCommand
- The command to run. The submissionTime of the task is set after this call. This does not mean that the job has started - it might be queued.- Returns:
- string
-
-