public class ThreadedJobExecutor extends Object implements JobExecutor
JobExecutor
using a shared ExecutorService
.JobExecutor.Executing
Constructor and Description |
---|
ThreadedJobExecutor(Executor executor)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
JobExecutor.Executing |
submit(ExecutionMonitor monitor,
ExecutionContext context,
Job job,
BlockingQueue<JobExecutor.Executing> doneQueue)
Submits a job.
|
public ThreadedJobExecutor(Executor executor)
executor
- thread managerIllegalArgumentException
- if some parameters were null
public JobExecutor.Executing submit(ExecutionMonitor monitor, ExecutionContext context, Job job, BlockingQueue<JobExecutor.Executing> doneQueue) throws InterruptedException, IOException
JobExecutor
submit
in interface JobExecutor
monitor
- an execution monitorcontext
- current contextjob
- target jobdoneQueue
- the queue where the done tasks are putInterruptedException
- if submittion is interruptedIOException
- if failed to submit the target jobCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.