Class HibernateInternalRunDetailsDao
java.lang.Object
org.springframework.dao.support.DaoSupport
com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao<T>
com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateObjectDao<SchedulerRunDetails>
com.atlassian.confluence.internal.schedule.persistence.dao.HibernateInternalRunDetailsDao
- All Implemented Interfaces:
InternalRunDetailsDao
,org.springframework.beans.factory.InitializingBean
@Internal
public class HibernateInternalRunDetailsDao
extends ConfluenceHibernateObjectDao<SchedulerRunDetails>
implements InternalRunDetailsDao
The implementation of
InternalRunDetailsDao
interface- Since:
- 6.4.3
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
HibernateObjectDao.Cacheability
-
Field Summary
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
Fields inherited from interface com.atlassian.confluence.internal.schedule.persistence.dao.InternalRunDetailsDao
SCHEDULER_RUN_DETAILS
-
Constructor Summary
ConstructorsConstructorDescriptionHibernateInternalRunDetailsDao
(HibernateDatabaseCapabilities databaseCapabilities) -
Method Summary
Modifier and TypeMethodDescriptionlong
count
(Optional<com.atlassian.scheduler.config.JobId> jobId, long timeToLiveThreshold, com.atlassian.scheduler.status.RunOutcome runOutcome) getRecentRunDetails
(com.atlassian.scheduler.config.JobId jobId) getRecentRunDetails
(com.atlassian.scheduler.config.JobId jobId, int limit) int
purgeAll()
This method purges all run details.int
purgeOldRunDetails
(SchedulerRunDetailsPurgeMode purgeMode, int limit) Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateObjectDao
updateModificationData
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
applyTransactionTimeout, applyTransactionTimeout, checkDaoConfig, createHibernateTemplate, findAll, findAllSorted, findAllSorted, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getByClassId, getCountResult, getHibernateTemplate, getSessionFactory, publishEvent, reIndex, remove, save, saveEntity, saveRaw, setHibernateTemplate, setSessionFactory, uniqueResult
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
-
Constructor Details
-
HibernateInternalRunDetailsDao
- Since:
- 7.13.17
-
-
Method Details
-
getPersistentClass
- Specified by:
getPersistentClass
in classHibernateObjectDao<SchedulerRunDetails>
-
purgeOldRunDetails
- Specified by:
purgeOldRunDetails
in interfaceInternalRunDetailsDao
- Parameters:
purgeMode
- the purge mode (ALL or UNSUCCESSFUL)limit
- the number of records to be purged- Returns:
- the number of job runs deleted
-
count
public long count(Optional<com.atlassian.scheduler.config.JobId> jobId, long timeToLiveThreshold, com.atlassian.scheduler.status.RunOutcome runOutcome) - Specified by:
count
in interfaceInternalRunDetailsDao
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
public int purgeAll()Description copied from interface:InternalRunDetailsDao
This method purges all run details. This method is mainly used for testing purpose.- Specified by:
purgeAll
in interfaceInternalRunDetailsDao
- Returns:
- the number of run details purged
-
getRecentRunDetails
public List<SchedulerRunDetails> getRecentRunDetails(com.atlassian.scheduler.config.JobId jobId, int limit) - Specified by:
getRecentRunDetails
in interfaceInternalRunDetailsDao
- Parameters:
jobId
- the JobId of the scheduled joblimit
- the number of run details to be retrieved- Returns:
- a list of recent run details
-
getRecentRunDetails
- Specified by:
getRecentRunDetails
in interfaceInternalRunDetailsDao
- 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
-