Interface InternalRunDetailsDao
-
- All Known Implementing Classes:
HibernateInternalRunDetailsDao
@Internal @Transactional public interface InternalRunDetailsDao
Internal DAO class for manipulating the scheduler_run_details table- Since:
- 6.4.3
-
-
Field Summary
Fields Modifier and Type Field Description static String
SCHEDULER_RUN_DETAILS
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
count(Optional<com.atlassian.scheduler.config.JobId> jobId, long timeToLiveThreshold, com.atlassian.scheduler.status.RunOutcome runOutcome)
List<SchedulerRunDetails>
getRecentRunDetails(com.atlassian.scheduler.config.JobId jobId)
List<SchedulerRunDetails>
getRecentRunDetails(com.atlassian.scheduler.config.JobId jobId, int limit)
int
purgeAll()
This method purges all run details.int
purgeOldRunDetails(SchedulerRunDetailsPurgeMode purgeMode, int limit)
-
-
-
Field Detail
-
SCHEDULER_RUN_DETAILS
static final String SCHEDULER_RUN_DETAILS
- See Also:
- Constant Field Values
-
-
Method Detail
-
purgeOldRunDetails
@Transactional(propagation=REQUIRES_NEW) int purgeOldRunDetails(SchedulerRunDetailsPurgeMode purgeMode, int limit)
- Parameters:
purgeMode
- the purge mode (ALL or UNSUCCESSFUL)limit
- the number of records to be purged- Returns:
- the number of job runs deleted
-
count
long count(Optional<com.atlassian.scheduler.config.JobId> jobId, long timeToLiveThreshold, com.atlassian.scheduler.status.RunOutcome runOutcome)
- Parameters:
timeToLiveThreshold
- all job runs that occur before this threshold (from the past to now, in millis) will be includedrunOutcome
- the run outcome that should be matched- Returns:
- the total count of job runs that satisfies the timeToLiveThreshold
-
purgeAll
@Transactional(propagation=REQUIRES_NEW) int purgeAll()
This method purges all run details. This method is mainly used for testing purpose.- Returns:
- the number of run details purged
-
getRecentRunDetails
List<SchedulerRunDetails> getRecentRunDetails(com.atlassian.scheduler.config.JobId jobId, int limit)
- Parameters:
jobId
- the JobId of the scheduled joblimit
- the number of run details to be retrieved- Returns:
- a list of recent run details
- Since:
- 6.5.1
-
getRecentRunDetails
List<SchedulerRunDetails> getRecentRunDetails(com.atlassian.scheduler.config.JobId jobId)
- Parameters:
jobId
- the JobId of the scheduled job- Returns:
- a list of recent run details, the size of the list is limited to MAX_HISTORY defined in
ScheduledJobStatus
- Since:
- 6.5.1
-
-