@Role public interface JobExecutor
GroupedJob
to make sure they con't be executed at the same time than the jobs from the same groups.GroupedJob
,
Job
Modifier and Type | Method and Description |
---|---|
void |
execute(Job job)
Add a new job in the queue of jobs to execute.
|
Job |
execute(String jobType,
Request request)
Create and add a new job in the queue of jobs to execute.
|
Job |
getCurrentJob(JobGroupPath groupPath)
The current job running in the passed jobs group.
|
Job |
getJob(List<String> jobId)
Return job corresponding to the provided id from the current executed or waiting jobs.
|
Job getCurrentJob(JobGroupPath groupPath)
groupPath
- the group pathJob getJob(List<String> jobId)
jobId
- the id of the jobJob execute(String jobType, Request request) throws JobException
jobType
- the role hint of the job componentrequest
- the requestJobException
- error when creating the jobRejectedExecutionException
- if this task cannot be accepted for execution (for
example when the JobExecutor
is disposed).void execute(Job job)
job
- the job to executeRejectedExecutionException
- if this task cannot be accepted for execution (for
example when the JobExecutor
is disposed).Copyright © 2004–2021 XWiki. All rights reserved.