public class ContentProviderSyncJob extends Object implements org.quartz.StatefulJob
ContentSource. After synchronizing
the metadata, this will also attempt to load the content if the content source is not configured for
lazy loading.
This implements StatefulJob (as opposed to Job) because we do not need nor want this job triggered
concurrently. That is, we don't need multiple instances of this job running at the same time.
| Modifier and Type | Field and Description |
|---|---|
static String |
DATAMAP_SYNC_IMPORTED_REPOS |
| Constructor and Description |
|---|
ContentProviderSyncJob() |
| Modifier and Type | Method and Description |
|---|---|
static org.quartz.JobDataMap |
createJobDataMap(org.rhq.core.domain.content.ContentSource contentSource,
org.quartz.JobDetail details)
All content source sync jobs must have specified data prepared
in their job details data map.
|
static String |
createJobName(org.rhq.core.domain.content.ContentSource cs)
Creates the name for the scheduled content source's sync job.
|
static String |
createUniqueJobName(org.rhq.core.domain.content.ContentSource cs)
Creates a unique name for a new content source sync job.
|
void |
execute(org.quartz.JobExecutionContext context) |
int |
getPercentComplete() |
public static final String DATAMAP_SYNC_IMPORTED_REPOS
public int getPercentComplete()
public void execute(org.quartz.JobExecutionContext context)
throws org.quartz.JobExecutionException
execute in interface org.quartz.Joborg.quartz.JobExecutionExceptionpublic static org.quartz.JobDataMap createJobDataMap(org.rhq.core.domain.content.ContentSource contentSource,
org.quartz.JobDetail details)
null, this will place the
created data map in the details for you. Otherwise, you must ensure
the returned data map gets associated with the job when it is created.contentSource - the content source whose sync job's details is being prepareddetails - where the job's data map will be stored (may be null)public static String createJobName(org.rhq.core.domain.content.ContentSource cs)
cs - the content source whose scheduled job name is to be returnedpublic static String createUniqueJobName(org.rhq.core.domain.content.ContentSource cs)
cs - the content sourceCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.