org.rhq.enterprise.server.scheduler.jobs
Class DataPurgeJob
java.lang.Object
org.rhq.enterprise.server.scheduler.jobs.AbstractStatefulJob
org.rhq.enterprise.server.scheduler.jobs.DataPurgeJob
- All Implemented Interfaces:
- org.quartz.Job, org.quartz.StatefulJob
public class DataPurgeJob
- extends AbstractStatefulJob
This implements StatefulJob (as opposed to Job) because we do not need nor want this job triggered
concurrently. That is, we don't want multiple data purge jobs performing the data purge at the same time.
|
Method Summary |
void |
calculateOOBs()
Calculate the OOB values for the last hour. |
void |
executeJobCode(org.quartz.JobExecutionContext context)
Subclasses should implement this method to perform the actual job. |
static void |
purgeNow()
Schedules a purge job to trigger right now. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataPurgeJob
public DataPurgeJob()
purgeNow
public static void purgeNow()
throws Exception
- Schedules a purge job to trigger right now. This will not block - it schedules the job to trigger but immediately
returns. This method will ensure that no two data purge jobs will execute at the same time (Quartz will ensure
this since
DataPurgeJob is an implementation of StatefulJob).
- Throws:
Exception - if failed to schedule the data purge for immediate execution
executeJobCode
public void executeJobCode(org.quartz.JobExecutionContext context)
throws org.quartz.JobExecutionException
- Description copied from class:
AbstractStatefulJob
- Subclasses should implement this method to perform the actual job.
- Specified by:
executeJobCode in class AbstractStatefulJob
- Throws:
org.quartz.JobExecutionException
calculateOOBs
public void calculateOOBs()
- Calculate the OOB values for the last hour.
This also removes outdated ones due to recalculated baselines.
Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.