com.norconex.jef
Class AsyncLimitedJobGroup
java.lang.Object
com.norconex.jef.AbstractJobGroup
com.norconex.jef.AsyncJobGroup
com.norconex.jef.AsyncLimitedJobGroup
- All Implemented Interfaces:
- IJob, IJobGroup
public class AsyncLimitedJobGroup
- extends AsyncJobGroup
Job responsible for running a group of jobs asynchronously with only so many
jobs running at the same time. The maximum number of job is started and
once one is completed, another is started. The progress of this
group reflects the average progress of all its jobs. This job group
is considered completed and will only return when all its jobs are
done executing. An exception in one job will not stop the other jobs
in the group from running. On the other hand, one or more exception will
result in this group to fail.
- Since:
- 1.1.1
- Author:
- David Gaulin (david.gaulin@norconex.com)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AsyncLimitedJobGroup
public AsyncLimitedJobGroup(String id,
int maxNumberOfRunningJobs,
IJob... jobs)
- Constructor.
- Parameters:
id
- unique identifier for this job groupjobs
- jobs making up this group
AsyncLimitedJobGroup
public AsyncLimitedJobGroup(String id,
int maxNumberOfRunningJobs,
String description,
IJob... jobs)
- Constructor.
- Parameters:
id
- unique identifier for this job groupjobs
- jobs making up this group
execute
public final void execute(JobProgress progress,
JobSuite suite)
- Description copied from interface:
IJob
- Executes this job. Implementors are responsible for updating
execution progress on the given
JobProgress
.
- Specified by:
execute
in interface IJob
- Overrides:
execute
in class AsyncJobGroup
- Parameters:
progress
- current job progresssuite
- job suite this job is part of
Copyright © 2007-2013 Norconex Inc.. All Rights Reserved.