/** * Retrieve all jobs * * @param lookupType Query type * @return List of all jobs (limited by results limit) */ public List<JobExecutionInfo> queryAllJobs(QueryListType lookupType, int resultsLimit) throws RemoteInvocationException { JobExecutionQuery query = new JobExecutionQuery(); query.setIdType(QueryIdTypeEnum.LIST_TYPE); query.setId(JobExecutionQuery.Id.create(lookupType)); // Disable properties and task executions (prevents response size from ballooning) query.setJobProperties(ConfigurationKeys.JOB_RUN_ONCE_KEY + "," + ConfigurationKeys.JOB_SCHEDULE_KEY); query.setIncludeTaskExecutions(false); query.setLimit(resultsLimit); return executeQuery(query); }
/** * Retrieve all jobs * * @param lookupType Query type * @return List of all jobs (limited by results limit) */ public List<JobExecutionInfo> queryAllJobs(QueryListType lookupType, int resultsLimit) throws RemoteInvocationException { JobExecutionQuery query = new JobExecutionQuery(); query.setIdType(QueryIdTypeEnum.LIST_TYPE); query.setId(JobExecutionQuery.Id.create(lookupType)); // Disable properties and task executions (prevents response size from ballooning) query.setJobProperties(ConfigurationKeys.JOB_RUN_ONCE_KEY + "," + ConfigurationKeys.JOB_SCHEDULE_KEY); query.setIncludeTaskExecutions(false); query.setLimit(resultsLimit); return executeQuery(query); }