Class HibernateInternalRunDetailsDao
- java.lang.Object
-
- org.springframework.dao.support.DaoSupport
-
- com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao<T>
-
- com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao<T>
-
- com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateObjectDao<SchedulerRunDetails>
-
- com.atlassian.confluence.internal.schedule.persistence.dao.HibernateInternalRunDetailsDao
-
- All Implemented Interfaces:
ObjectDao,VersionedObjectDao<SchedulerRunDetails>,ObjectDaoInternal<SchedulerRunDetails>,VersionedObjectDaoInternal<SchedulerRunDetails>,InternalRunDetailsDao,org.springframework.beans.factory.InitializingBean
@Internal public class HibernateInternalRunDetailsDao extends ConfluenceHibernateObjectDao<SchedulerRunDetails> implements InternalRunDetailsDao
The implementation ofInternalRunDetailsDaointerface- 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 com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
cacheFactory, confluenceUserDao
-
Fields inherited from interface com.atlassian.confluence.internal.schedule.persistence.dao.InternalRunDetailsDao
SCHEDULER_RUN_DETAILS
-
-
Constructor Summary
Constructors Constructor Description HibernateInternalRunDetailsDao(HibernateDatabaseCapabilities databaseCapabilities)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcount(Optional<com.atlassian.scheduler.config.JobId> jobId, long timeToLiveThreshold, com.atlassian.scheduler.status.RunOutcome runOutcome)Class<SchedulerRunDetails>getPersistentClass()Gets the type ofEntityObjectthis Dao works with.List<SchedulerRunDetails>getRecentRunDetails(com.atlassian.scheduler.config.JobId jobId)List<SchedulerRunDetails>getRecentRunDetails(com.atlassian.scheduler.config.JobId jobId, int limit)intpurgeAll()This method purges all run details.intpurgeOldRunDetails(SchedulerRunDetailsPurgeMode purgeMode, int limit)-
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
findAllSorted, findLatestVersionsCount, findLatestVersionsCount, findLatestVersionsIterator, findLatestVersionsIterator, findNamedQueryStringParams, findNamedQueryStringParams, save, saveEntity, setCacheFactory, setConfluenceUserDao, updateEntityModificationData, updateModificationData
-
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
applyTransactionTimeout, applyTransactionTimeout, checkDaoConfig, createHibernateTemplate, findAll, findAllSorted, findByClassIds, findByClassIdsFiltered, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getByClassId, getCountResult, getHibernateTemplate, getSessionFactory, index, indexEntity, refresh, refreshEntity, reIndex, reIndexEntity, remove, removeEntity, replicate, replicateEntity, save, saveEntity, saveRaw, saveRawEntity, setEventPublisher, setHibernateTemplate, setIndexer, setSessionFactory, unIndex, unIndexEntity, uniqueResult
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.internal.persistence.ObjectDaoInternal
findAll, findAllSorted, findByClassIds, findByClassIdsFiltered, refresh, refreshEntity, remove, removeEntity, replicate, replicateEntity, save, saveEntity, saveRaw, saveRawEntity
-
-
-
-
Constructor Detail
-
HibernateInternalRunDetailsDao
public HibernateInternalRunDetailsDao(HibernateDatabaseCapabilities databaseCapabilities)
- Since:
- 7.13.17
-
-
Method Detail
-
getPersistentClass
public Class<SchedulerRunDetails> getPersistentClass()
Description copied from interface:ObjectDaoInternalGets the type ofEntityObjectthis Dao works with.- Specified by:
getPersistentClassin interfaceObjectDao- Specified by:
getPersistentClassin interfaceObjectDaoInternal<SchedulerRunDetails>- Returns:
- the type
-
purgeOldRunDetails
public int purgeOldRunDetails(SchedulerRunDetailsPurgeMode purgeMode, int limit)
- Specified by:
purgeOldRunDetailsin 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:
countin interfaceInternalRunDetailsDaotimeToLiveThreshold- 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:InternalRunDetailsDaoThis method purges all run details. This method is mainly used for testing purpose.- Specified by:
purgeAllin interfaceInternalRunDetailsDao- Returns:
- the number of run details purged
-
getRecentRunDetails
public List<SchedulerRunDetails> getRecentRunDetails(com.atlassian.scheduler.config.JobId jobId, int limit)
- Specified by:
getRecentRunDetailsin 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
public List<SchedulerRunDetails> getRecentRunDetails(com.atlassian.scheduler.config.JobId jobId)
- Specified by:
getRecentRunDetailsin 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
-
-