public abstract class JobScheduler extends Object implements Service
Job
s.Modifier and Type | Class and Description |
---|---|
static class |
JobScheduler.ErrorHandler
Handles errors during
each job execution . |
Modifier and Type | Field and Description |
---|---|
static JobScheduler.ErrorHandler |
BEST_EFFORT
Continue execution on exception occurred.
|
static JobScheduler.ErrorHandler |
STRICT
Terminate execution on exception occurred.
|
Constructor and Description |
---|
JobScheduler() |
Modifier and Type | Method and Description |
---|---|
void |
configure(ServiceProfile<?> profile)
Configures this service.
|
protected void |
doConfigure(ServiceProfile<?> profile)
Configures this service internally (extention point).
|
abstract void |
execute(PhaseMonitor monitor,
ExecutionContext context,
List<? extends Job> jobs,
JobScheduler.ErrorHandler errorHandler)
Executes a series of jobs.
|
public static final JobScheduler.ErrorHandler STRICT
public static final JobScheduler.ErrorHandler BEST_EFFORT
public final void configure(ServiceProfile<?> profile) throws InterruptedException, IOException
Service
configure
in interface Service
profile
- the profile of this serviceInterruptedException
- if interrupted in configurationIOException
- if failed to configure this serviceprotected void doConfigure(ServiceProfile<?> profile) throws InterruptedException, IOException
profile
- profile of this serviceInterruptedException
- if interrupted this configurationIOException
- if failed to configurepublic abstract void execute(PhaseMonitor monitor, ExecutionContext context, List<? extends Job> jobs, JobScheduler.ErrorHandler errorHandler) throws InterruptedException, IOException
monitor
- the progress monitor of the executioncontext
- current execution contextjobs
- jobs to be executederrorHandler
- handles errors during each job executionInterruptedException
- if the execution was interruptedIOException
- if failed to execute the jobsCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.