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 the 
SchedulerRunDetailsManager interface.
 It mostly delegates the work to the InternalRunDetailsDao object.- Since:
- 6.4.3
- 
Field SummaryFields inherited from interface com.atlassian.confluence.schedule.managers.SchedulerRunDetailsManagerALL_JOBS_TTL_MILLIS, UNSUCCESSFUL_JOBS_TTL_MILLIS
- 
Constructor SummaryConstructorsConstructorDescriptionDefaultSchedulerRunDetailsManager(InternalRunDetailsDao internalRunDetailsDao, com.atlassian.scheduler.SchedulerService schedulerService) 
- 
Method SummaryModifier and TypeMethodDescriptioncom.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 millisecondsThis method purges the old run details, i.e.
- 
Constructor Details- 
DefaultSchedulerRunDetailsManagerpublic DefaultSchedulerRunDetailsManager(InternalRunDetailsDao internalRunDetailsDao, com.atlassian.scheduler.SchedulerService schedulerService) 
 
- 
- 
Method Details- 
purgeOldRunDetailsDescription 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
- Parameters:
- 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
 
 
-