public class RepoSyncJob extends Object implements org.quartz.StatefulJob, org.quartz.InterruptableJob
ContentProviderManager. The methods in
this job do not call that directly, but rather go through EJB methods to get there.
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.
Much of the functionality in this class was migrated from ContentProviderSyncJob.| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_REPO_NAME |
| Constructor and Description |
|---|
RepoSyncJob() |
| Modifier and Type | Method and Description |
|---|---|
static org.quartz.JobDataMap |
createJobDataMap(org.quartz.JobDetail details,
org.rhq.core.domain.content.Repo repo)
Creates (if necessary) and populates a job details map to contain the necessary data to
perform a repo sync.
|
static String |
createJobName(org.rhq.core.domain.content.Repo repo)
Creates a name to use when scheduling a repo sync job.
|
static String |
createUniqueJobName(org.rhq.core.domain.content.Repo repo)
Performs similar to {#createJobName} except adds uniqueness to the name regardless of the
parameters.
|
void |
execute(org.quartz.JobExecutionContext context) |
void |
interrupt() |
public static final String KEY_REPO_NAME
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.quartz.JobDetail details,
org.rhq.core.domain.content.Repo repo)
details - may not be nullrepo - may not be nullJobDetail.getJobDataMap() call of the details object if
that call does not return nullpublic static String createJobName(org.rhq.core.domain.content.Repo repo)
repo - may not be nullnullpublic static String createUniqueJobName(org.rhq.core.domain.content.Repo repo)
repo - may not be nullnullpublic void interrupt()
throws org.quartz.UnableToInterruptJobException
interrupt in interface org.quartz.InterruptableJoborg.quartz.UnableToInterruptJobExceptionCopyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.