接口 JobService
-
- 所有已知实现类:
JobServiceImpl
public interface JobService
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 booleandeleteByJobId(Integer id)根据任务id 删除任务booleanendJob(Integer jobId, String jobLogId, String result, String msg, Integer status)结束一个任务List<String>findArgsById(String id)根据id获取参数JobfindByJobId(Integer jobId)根据id获取任务JobfindByJobIdAndUse(Integer id)根据id 查找获取可用的jobintfindCountJobByArgs(String args)根据args获取数量List<Job>findDispatchJob(String watchServer, String environment, String serviceId)获取到需要监控的List<Job>findJobsByServiceId(String serviceId, String environment)根据服务环境获取任务List<Job>findMiss(String instanceId, Integer[] ids, Map<Integer,JobTask> jobTask)查找不存在的List<Job>findWatch(String instanceId, String environment, String serviceId)查找当前服务监控Map<String,Object>getCount(String environment)Map<String,Integer>getNormalStateTaskNumber(List<Integer> logStatus, Long startTime, Long endTime, List<Integer> jobStatus)获取正常任务状态数量 活跃非活跃booleanhasTask(Integer id)判断是否为我这个服务调度 判断1: 状态是否为1 2: 监控服务是否为当前服务booleankillAwaitJob(Integer jobId)删除正在等待的任务booleansaveJob(Job job)保存一个任务net.risedata.jdbc.commons.LPage<Job>search(Job job, LPageable pageable, ConcurrentSecurity jurisdiction)分页查询任务intsearchCountByJobType(String name, String environment)查询根据类型查询任务List<Map<String,Object>>searchJob(Job job, ConcurrentSecurity securityJurisdiction)获取所有任务返回描述和idList<Job>searchJobByArgs(String args)根据args参数查询数据List<String>searchJobService(Job job, ConcurrentSecurity securityJurisdiction)查询所有的任务名字voidsetStatus(Integer id, int status)修改状态voidupdateNoWatch(Integer[] ids)清理掉不属于该服务调度的任务调度booleanupdateWatch(Integer instanceId, String watchServer, String ovlWatchServer)修改监控
-
-
-
方法详细资料
-
saveJob
boolean saveJob(Job job)
保存一个任务- 参数:
job-- 返回:
-
deleteByJobId
boolean deleteByJobId(Integer id)
根据任务id 删除任务- 参数:
id-- 返回:
-
findDispatchJob
List<Job> findDispatchJob(String watchServer, String environment, String serviceId)
获取到需要监控的- 参数:
watchServer-environment-- 返回:
-
search
net.risedata.jdbc.commons.LPage<Job> search(Job job, LPageable pageable, ConcurrentSecurity jurisdiction)
分页查询任务- 参数:
job-pageable-jurisdiction-- 返回:
-
findMiss
List<Job> findMiss(String instanceId, Integer[] ids, Map<Integer,JobTask> jobTask)
查找不存在的- 参数:
instanceId- 当前实例idids- key 集合jobTask-- 返回:
-
setStatus
void setStatus(Integer id, int status)
修改状态- 参数:
id-status-
-
findWatch
List<Job> findWatch(String instanceId, String environment, String serviceId)
查找当前服务监控- 参数:
instanceId-environment-serviceId-- 返回:
-
updateWatch
boolean updateWatch(Integer instanceId, String watchServer, String ovlWatchServer)
修改监控- 参数:
instanceId- 当前idwatchServer- 监控服务ovlWatchServer- 旧的监控名
-
updateNoWatch
void updateNoWatch(Integer[] ids)
清理掉不属于该服务调度的任务调度- 参数:
ids-
-
hasTask
boolean hasTask(Integer id)
判断是否为我这个服务调度 判断1: 状态是否为1 2: 监控服务是否为当前服务- 参数:
id-- 返回:
-
searchJob
List<Map<String,Object>> searchJob(Job job, ConcurrentSecurity securityJurisdiction)
获取所有任务返回描述和id- 参数:
securityJurisdiction-- 返回:
-
searchJobService
List<String> searchJobService(Job job, ConcurrentSecurity securityJurisdiction)
查询所有的任务名字- 参数:
environment-securityJurisdiction-- 返回:
-
searchCountByJobType
int searchCountByJobType(String name, String environment)
查询根据类型查询任务- 参数:
name-environment-- 返回:
-
killAwaitJob
boolean killAwaitJob(Integer jobId)
删除正在等待的任务- 参数:
jobId-- 返回:
-
endJob
boolean endJob(Integer jobId, String jobLogId, String result, String msg, Integer status)
结束一个任务- 参数:
jobId-jobLogId-result-- 返回:
-
findJobsByServiceId
List<Job> findJobsByServiceId(String serviceId, String environment)
根据服务环境获取任务- 参数:
serviceId-environment-- 返回:
-
findCountJobByArgs
int findCountJobByArgs(String args)
根据args获取数量- 参数:
args-- 返回:
-
-