Class TaskManager
java.lang.Object
io.goobi.viewer.api.rest.model.tasks.TaskManager
Manages (possibly timeconsuming)
tasks
within the viewer which can be triggered and monitored via the TasksResource
. The tasks
are not executed sequentially or queued in any way, except through the limit of the internal thread pool (5 parallel tasks)- Author:
- florian
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic BiConsumer<javax.servlet.http.HttpServletRequest,
Task> createTask
(TaskType type) getTask
(long jobId) getTasks()
removeTask
(long jobId) triggerTaskInThread
(long jobId, javax.servlet.http.HttpServletRequest request)
-
Constructor Details
-
TaskManager
Create new JobManager.- Parameters:
jobLiveTime
- The guaranteed live time of jobs in the jobManager
-
-
Method Details
-
addTask
-
getTask
-
removeTask
-
triggerTaskInThread
-
getTasks
-
getTasks
-
createTask
- Parameters:
type
-- Returns:
- BiConsumer<HttpServletRequest, Task>
-