Interface CronJobHistoryService
-
- All Known Implementing Classes:
DefaultCronJobHistoryService
public interface CronJobHistoryServiceConvenient service for getting all historical information such as: start time, finish date, progress etc. related toCronJobModel.- Since:
- 6.4
- Spring Bean ID:
- cronJobHistoryService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.LonggetAverageExecutionTime(UserModel userModel, java.lang.String jobCode, java.util.concurrent.TimeUnit timeUnit)Returns average execution time based on historical data.java.util.List<CronJobHistoryModel>getCronJobHistoryBy(UserModel userModel, JobModel jobModel)Returns cron job history entries triggered by given user for given job.java.util.List<CronJobHistoryModel>getCronJobHistoryBy(UserModel userModel, java.lang.String jobItemType, java.util.Date startDate, java.util.Date finishDate)Returns cron job history entries triggered by given user for given job type and time range.java.util.List<CronJobHistoryModel>getCronJobHistoryBy(UserModel userModel, java.lang.String jobItemType, java.util.Date startDate, java.util.Date finishDate, CronJobResult theResult)Returns cron job history entries triggered by given user for given job type and time range and the cron job's result.java.util.List<CronJobHistoryModel>getCronJobHistoryBy(UserModel userModel, java.lang.String jobItemType, java.util.Date startDate, java.util.Date finishDate, CronJobStatus theStatus)Returns cron job history entries triggered by given user for given job type and time range and the cron job's status.java.util.List<CronJobHistoryModel>getCronJobHistoryBy(java.lang.String cronJobCode)java.util.List<CronJobHistoryModel>getCronJobHistoryBy(java.util.List<java.lang.String> cronJobCodes)java.util.List<CronJobHistoryModel>getCronJobHistoryBy(java.util.Set<CronJobHistoryInclude> includes, UserModel userModel, java.util.Date startDate, java.util.Date finishDate, CronJobStatus theStatus)Returns list ofCronJobHistoryModelwhere for every include criteria entries matching given user, startDate, finishDate and status are returned.
-
-
-
Method Detail
-
getCronJobHistoryBy
java.util.List<CronJobHistoryModel> getCronJobHistoryBy(java.lang.String cronJobCode)
- Parameters:
cronJobCode- given cron job code- Returns:
- matching cron job history entry for given cron job code.
-
getCronJobHistoryBy
java.util.List<CronJobHistoryModel> getCronJobHistoryBy(java.util.List<java.lang.String> cronJobCodes)
- Parameters:
cronJobCodes- given cron job codes- Returns:
- matching cron job history entries for given cron job code.
-
getCronJobHistoryBy
java.util.List<CronJobHistoryModel> getCronJobHistoryBy(UserModel userModel, JobModel jobModel)
Returns cron job history entries triggered by given user for given job.- Parameters:
userModel- given user modeljobModel- given job model- Returns:
- matching cron job history entries
-
getCronJobHistoryBy
java.util.List<CronJobHistoryModel> getCronJobHistoryBy(UserModel userModel, java.lang.String jobItemType, java.util.Date startDate, java.util.Date finishDate)
Returns cron job history entries triggered by given user for given job type and time range. Note: Time range means the time period when cron job was performing i.e cron jobs's start date is greater or equal the the given startDate and cron job's finish date is lesser or equal to the given finishDate.- Parameters:
userModel- given user modeljobItemType- given job item type - for limit the results to this type only please use following syntax 'SyncItemJob!'.startDate- desired time datefinishDate- desired finish date- Returns:
- matching cron job history entries
-
getCronJobHistoryBy
java.util.List<CronJobHistoryModel> getCronJobHistoryBy(UserModel userModel, java.lang.String jobItemType, java.util.Date startDate, java.util.Date finishDate, CronJobStatus theStatus)
Returns cron job history entries triggered by given user for given job type and time range and the cron job's status. Note: Time range means the time period when cron job was performing i.e cron jobs's start date is greater or equal the the given startDate and cron job's finish date is lesser or equal to the given finishDate.- Parameters:
userModel- given user modeljobItemType- given job item type - for limit the results to this type only please use following syntax e.g. 'SyncItemJob!'.startDate- desired time datefinishDate- desired finish datetheStatus- desired cron job status- Returns:
- matching cron job history entries
-
getCronJobHistoryBy
java.util.List<CronJobHistoryModel> getCronJobHistoryBy(java.util.Set<CronJobHistoryInclude> includes, UserModel userModel, java.util.Date startDate, java.util.Date finishDate, CronJobStatus theStatus)
Returns list ofCronJobHistoryModelwhere for every include criteria entries matching given user, startDate, finishDate and status are returned. Result of all includes in combined into one Note: Time range means the time period when cron job was performing i.e cron jobs's start date is greater or equal the the given startDate and cron job's finish date is lesser or equal to the given finishDate.- Parameters:
includes- set of search criteria which allow to specify cronJob's type code, job's type code and list of job's codes.userModel- given user modelstartDate- given start datefinishDate- given finish datetheStatus- given cron job's status- Returns:
- a
CronJobHistoryModel
-
getCronJobHistoryBy
java.util.List<CronJobHistoryModel> getCronJobHistoryBy(UserModel userModel, java.lang.String jobItemType, java.util.Date startDate, java.util.Date finishDate, CronJobResult theResult)
Returns cron job history entries triggered by given user for given job type and time range and the cron job's result. Note: Time range means the time period when cron job was performing i.e cron jobs's start date is greater or equal the the given startDate and cron job's finish date is lesser or equal to the given finishDate.- Parameters:
userModel- given user modeljobItemType- given job item type - for limit the results to this type only please use following syntax e.g. 'SyncItemJob!'.startDate- desired time datefinishDate- desired finish datetheResult- desired cron job result- Returns:
- matching cron job history entries
-
getAverageExecutionTime
java.lang.Long getAverageExecutionTime(UserModel userModel, java.lang.String jobCode, java.util.concurrent.TimeUnit timeUnit)
Returns average execution time based on historical data.- Parameters:
userModel- given user modeljobCode- code of job to get data fortimeUnit- time unit to return- Returns:
- average execution time in given time unit or null if no data is available
-
-