类 JobLogServiceImpl
- java.lang.Object
-
- net.risedata.jdbc.service.impl.CrudServiceImpl<T,ID>
-
- net.risedata.jdbc.service.impl.AutomaticCrudService<JobLog,String>
-
- net.risesoft.api.persistence.job.impl.JobLogServiceImpl
-
- 所有已实现的接口:
CrudService<JobLog,String>,JobLogService
@Service public class JobLogServiceImpl extends AutomaticCrudService<JobLog,String> implements JobLogService
-
-
构造器概要
构造器 构造器 说明 JobLogServiceImpl()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanappendLog(String id, String logContext)添加日志voidappendSource(String id, String source, String msg)添加调度源voidclearLog(Date time)清除日志 小于这个时间的voidclearTimeOutJob()清理掉调度超时的任务voidendJob(String id, int success, String msg, String result, String environment)结束任务JobLogfindById(String id)根据id 查找StringfindConsoleById(String id)JobLogfindDownJob(Integer id, List<String> logs)获取到因为掉线没执行的jobList<JobLog>findDownJobs(Integer id, List<String> logs)拿到当前job在运行中的IntegergetExecutedCountByStatusAndTime(List<Integer> statusList, long start, long end)List<Map<String,Object>>getExecutedCountGroupByDispatchTime(List<Integer> statusList, long start, long end)IntegergetLogCount(String environment)获取执行任务的数量List<Map<String,Object>>getLogGroupInfo(List<Integer> statuslist, Long startTime, Long endTime)org.springframework.cloud.client.ServiceInstancegetRunableMinInstance(List<org.springframework.cloud.client.ServiceInstance> instanceIds)拿到运行任务最少的List<Map<String,Object>>getSchedulingInfo(List<Integer> statuslist, Long startTime, Long endTime, String environment)booleanisBlock(Integer jobId, int timeOut, String logId)是否阻塞booleankillAwaitJob(Integer jobId)删除掉正在等待的任务JobLogpollJob(Integer jobId, int timeOut)获取最早在排队的任务进行调度booleansaveLog(JobLog jobLog)保存日志net.risedata.jdbc.commons.LPage<Map<String,Object>>search(JobLog job, LPageable page, ConcurrentSecurity securityJurisdiction, String jobType, Integer[] jobIds)查询日志net.risedata.jdbc.commons.LPage<Map<String,Object>>searchByGroup(Date startDate, Date endDate, String environment, LPageable page, String jobName)List<Map<String,Object>>searchByGroupLog(Date startDate, Date endDate, String environment, String jobName)booleanupdateStatus(String logId, Integer status)修改状态booleanupdateStatus(String logId, Integer status, Integer ovlStatus)修改状态-
从类继承的方法 net.risedata.jdbc.service.impl.AutomaticCrudService
findByIds, getDeleteExecutor, getInsertExecutor, getSearchExecutor, getT, getUpdateExecutor, searchAll
-
从类继承的方法 net.risedata.jdbc.service.impl.CrudServiceImpl
batchInsert, delete, delete, delete, deleteById, deleteById, deleteByIds, findById, findOne, findOne, findOne, getOne, hasById, insert, save, search, search, search, search, search, search, searchAllForPage, searchAllForPage, searchAllForPage, searchFieldById, searchForList, searchForList, searchForPage, searchForPage, searchForPage, searchForPage, searchForPage, update, updateById, updateById, updateById
-
-
-
-
方法详细资料
-
isBlock
public boolean isBlock(Integer jobId, int timeOut, String logId)
从接口复制的说明:JobLogService是否阻塞- 指定者:
isBlock在接口中JobLogService- 参数:
jobId- 任务idtimeOut- 超时时间logId- 当前日志id- 返回:
-
saveLog
public boolean saveLog(JobLog jobLog)
从接口复制的说明:JobLogService保存日志- 指定者:
saveLog在接口中JobLogService- 返回:
-
appendLog
public boolean appendLog(String id, String logContext)
从接口复制的说明:JobLogService添加日志- 指定者:
appendLog在接口中JobLogService- 参数:
id- 日志idlogContext- 添加的内容- 返回:
-
updateStatus
public boolean updateStatus(String logId, Integer status, Integer ovlStatus)
从接口复制的说明:JobLogService修改状态- 指定者:
updateStatus在接口中JobLogService- 参数:
logId- 日志idstatus- 状态ovlStatus- 之前的状态- 返回:
-
updateStatus
public boolean updateStatus(String logId, Integer status)
从接口复制的说明:JobLogService修改状态- 指定者:
updateStatus在接口中JobLogService- 参数:
logId- 日志idstatus- 状态- 返回:
-
pollJob
public JobLog pollJob(Integer jobId, int timeOut)
从接口复制的说明:JobLogService获取最早在排队的任务进行调度- 指定者:
pollJob在接口中JobLogService- 返回:
-
endJob
public void endJob(String id, int success, String msg, String result, String environment)
从接口复制的说明:JobLogService结束任务- 指定者:
endJob在接口中JobLogService- 参数:
id- idsuccess- 状态msg- 消息result- 返回值
-
appendSource
public void appendSource(String id, String source, String msg)
从接口复制的说明:JobLogService添加调度源- 指定者:
appendSource在接口中JobLogService
-
findDownJob
public JobLog findDownJob(Integer id, List<String> logs)
从接口复制的说明:JobLogService获取到因为掉线没执行的job- 指定者:
findDownJob在接口中JobLogService- 返回:
-
findById
public JobLog findById(String id)
从接口复制的说明:JobLogService根据id 查找- 指定者:
findById在接口中JobLogService- 返回:
-
search
public net.risedata.jdbc.commons.LPage<Map<String,Object>> search(JobLog job, LPageable page, ConcurrentSecurity securityJurisdiction, String jobType, Integer[] jobIds)
从接口复制的说明:JobLogService查询日志- 指定者:
search在接口中JobLogService- 返回:
-
findConsoleById
public String findConsoleById(String id)
- 指定者:
findConsoleById在接口中JobLogService
-
clearLog
public void clearLog(Date time)
从接口复制的说明:JobLogService清除日志 小于这个时间的- 指定者:
clearLog在接口中JobLogService
-
clearTimeOutJob
public void clearTimeOutJob()
从接口复制的说明:JobLogService清理掉调度超时的任务- 指定者:
clearTimeOutJob在接口中JobLogService
-
getLogCount
public Integer getLogCount(String environment)
从接口复制的说明:JobLogService获取执行任务的数量- 指定者:
getLogCount在接口中JobLogService- 返回:
-
findDownJobs
public List<JobLog> findDownJobs(Integer id, List<String> logs)
从接口复制的说明:JobLogService拿到当前job在运行中的- 指定者:
findDownJobs在接口中JobLogService- 返回:
-
getRunableMinInstance
public org.springframework.cloud.client.ServiceInstance getRunableMinInstance(List<org.springframework.cloud.client.ServiceInstance> instanceIds)
从接口复制的说明:JobLogService拿到运行任务最少的- 指定者:
getRunableMinInstance在接口中JobLogService- 返回:
-
killAwaitJob
public boolean killAwaitJob(Integer jobId)
从接口复制的说明:JobLogService删除掉正在等待的任务- 指定者:
killAwaitJob在接口中JobLogService- 返回:
-
searchByGroup
public net.risedata.jdbc.commons.LPage<Map<String,Object>> searchByGroup(Date startDate, Date endDate, String environment, LPageable page, String jobName)
- 指定者:
searchByGroup在接口中JobLogService
-
searchByGroupLog
public List<Map<String,Object>> searchByGroupLog(Date startDate, Date endDate, String environment, String jobName)
- 指定者:
searchByGroupLog在接口中JobLogService
-
getExecutedCountByStatusAndTime
public Integer getExecutedCountByStatusAndTime(List<Integer> statusList, long start, long end)
- 指定者:
getExecutedCountByStatusAndTime在接口中JobLogService
-
getExecutedCountGroupByDispatchTime
public List<Map<String,Object>> getExecutedCountGroupByDispatchTime(List<Integer> statusList, long start, long end)
-
getSchedulingInfo
public List<Map<String,Object>> getSchedulingInfo(List<Integer> statuslist, Long startTime, Long endTime, String environment)
- 指定者:
getSchedulingInfo在接口中JobLogService
-
getLogGroupInfo
public List<Map<String,Object>> getLogGroupInfo(List<Integer> statuslist, Long startTime, Long endTime)
- 指定者:
getLogGroupInfo在接口中JobLogService
-
-