Class DefaultSchedulerRunDetailsManager
- java.lang.Object
- 
- com.atlassian.confluence.schedule.managers.DefaultSchedulerRunDetailsManager
 
- 
- All Implemented Interfaces:
- SchedulerRunDetailsManager
 
 @Internal public class DefaultSchedulerRunDetailsManager extends Object implements SchedulerRunDetailsManager The default implementation of theSchedulerRunDetailsManagerinterface. It mostly delegates the work to theInternalRunDetailsDaoobject.- Since:
- 6.4.3
 
- 
- 
Field Summary- 
Fields inherited from interface com.atlassian.confluence.schedule.managers.SchedulerRunDetailsManagerALL_JOBS_TTL_MILLIS, UNSUCCESSFUL_JOBS_TTL_MILLIS
 
- 
 - 
Constructor SummaryConstructors Constructor Description DefaultSchedulerRunDetailsManager(InternalRunDetailsDao internalRunDetailsDao, com.atlassian.scheduler.SchedulerService schedulerService)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description com.atlassian.scheduler.status.RunDetailsaddRunDetails(com.atlassian.scheduler.config.JobId jobId, Date startedAt, com.atlassian.scheduler.status.RunOutcome runOutcome, @Nullable String message)Delegates the task to the underlying Scheduler Service since the ConfluenceSchedulerService bean is not accessible from the add-onlongcount(com.atlassian.scheduler.config.JobId jobId, long timeToLiveThreshold, com.atlassian.scheduler.status.RunOutcome runOutcome)Count the job's run details that are stored before a time-to-live threshold in millisecondsorg.apache.commons.lang3.tuple.Pair<Integer,Integer>purgeOldRunDetails()This method purges the old run details, i.e.
 
- 
- 
- 
Constructor Detail- 
DefaultSchedulerRunDetailsManagerpublic DefaultSchedulerRunDetailsManager(InternalRunDetailsDao internalRunDetailsDao, com.atlassian.scheduler.SchedulerService schedulerService) 
 
- 
 - 
Method Detail- 
purgeOldRunDetailspublic org.apache.commons.lang3.tuple.Pair<Integer,Integer> purgeOldRunDetails() Description copied from interface:SchedulerRunDetailsManagerThis method purges the old run details, i.e. beforeor DefaultSchedulerRunDetailsManager#UNSUCCESSFUL_JOBS_TTL_MILLISThis prevents the table space from growing without bounds, and it is unlikely that you really care about the results of a scheduled job that hasn't run in that long, anyway.- Specified by:
- purgeOldRunDetailsin interface- SchedulerRunDetailsManager
- Returns:
- a Pair in which the left value is the number of total records purged and the right values is the number of batches
 
 - 
countpublic long count(com.atlassian.scheduler.config.JobId jobId, long timeToLiveThreshold, com.atlassian.scheduler.status.RunOutcome runOutcome)Description copied from interface:SchedulerRunDetailsManagerCount the job's run details that are stored before a time-to-live threshold in milliseconds- Specified by:
- countin interface- SchedulerRunDetailsManager
- timeToLiveThreshold- the TTL threshold
- runOutcome- the run outcome that should be matched
- Returns:
- the total count of job runs that satisfies the timeToLiveThreshold
 
 - 
addRunDetailspublic com.atlassian.scheduler.status.RunDetails addRunDetails(com.atlassian.scheduler.config.JobId jobId, Date startedAt, com.atlassian.scheduler.status.RunOutcome runOutcome, @Nullable String message)Description copied from interface:SchedulerRunDetailsManagerDelegates the task to the underlying Scheduler Service since the ConfluenceSchedulerService bean is not accessible from the add-on- Specified by:
- addRunDetailsin interface- SchedulerRunDetailsManager
- Parameters:
- jobId- the Job ID
- startedAt- when the job is started
- runOutcome- the run outcome
- message- the message
 
 
- 
 
-