public class PowerJobClient extends Object implements IPowerJobClient
| 构造器和说明 |
|---|
PowerJobClient(List<String> addressList,
String appName,
String password)
Init PowerJobClient with server address, appName and password.
|
PowerJobClient(String domain,
String appName,
String password)
Init PowerJobClient with domain, appName and password.
|
| 限定符和类型 | 方法和说明 |
|---|---|
ResultDTO<Void> |
cancelInstance(Long instanceId)
Cancel a job instance that is not yet running
Notice:There is a time interval between the call interface time and the expected execution time of the job instance to be cancelled, otherwise reliability is not guaranteed
|
ResultDTO<Long> |
copyJob(Long jobId)
Copy one Job
|
ResultDTO<Long> |
copyWorkflow(Long workflowId)
Copy one workflow
|
ResultDTO<Void> |
deleteJob(Long jobId)
Delete one job by jobId
|
ResultDTO<Void> |
deleteWorkflow(Long workflowId)
Delete Workflow by workflowId
|
ResultDTO<Void> |
disableJob(Long jobId)
Disable one Job by jobId
|
ResultDTO<Void> |
disableWorkflow(Long workflowId)
Disable Workflow by workflowId
|
ResultDTO<Void> |
enableJob(Long jobId)
Enable one job by jobId
|
ResultDTO<Void> |
enableWorkflow(Long workflowId)
Enable Workflow by workflowId
|
ResultDTO<SaveJobInfoRequest> |
exportJob(Long jobId) |
ResultDTO<List<JobInfoDTO>> |
fetchAllJob()
Query all JobInfo
|
ResultDTO<InstanceInfoDTO> |
fetchInstanceInfo(Long instanceId)
Query detail about a job instance
|
ResultDTO<Integer> |
fetchInstanceStatus(Long instanceId)
Query status about a job instance
|
ResultDTO<JobInfoDTO> |
fetchJob(Long jobId)
Query JobInfo by jobId
|
ResultDTO<WorkflowInfoDTO> |
fetchWorkflow(Long workflowId)
Query Workflow by workflowId
|
ResultDTO<WorkflowInstanceInfoDTO> |
fetchWorkflowInstanceInfo(Long wfInstanceId)
Query detail about a workflow instance
|
ResultDTO<Void> |
markWorkflowNodeAsSuccess(Long wfInstanceId,
Long nodeId)
mark the workflow node as success
|
ResultDTO<List<JobInfoDTO>> |
queryJob(JobInfoQuery powerQuery)
Query JobInfo by PowerQuery
|
ResultDTO<Void> |
retryInstance(Long instanceId)
Retry failed job instance
Notice: Only job instance with completion status (success, failure, manually stopped, cancelled) can be retried, and retries of job instances within workflows are not supported yet.
|
ResultDTO<Void> |
retryWorkflowInstance(Long wfInstanceId)
Retry one workflow instance
|
ResultDTO<Long> |
runJob(Long jobId) |
ResultDTO<Long> |
runJob(Long jobId,
String instanceParams,
long delayMS)
Run a job once
|
ResultDTO<Long> |
runWorkflow(Long workflowId) |
ResultDTO<Long> |
runWorkflow(Long workflowId,
String initParams,
long delayMS)
Run a workflow once
|
ResultDTO<Long> |
saveJob(SaveJobInfoRequest request)
Save one Job
When an ID exists in SaveJobInfoRequest, it is an update operation.
|
ResultDTO<Long> |
saveWorkflow(SaveWorkflowRequest request)
Save one workflow
When an ID exists in SaveWorkflowRequest, it is an update operation.
|
ResultDTO<List<WorkflowNodeInfoDTO>> |
saveWorkflowNode(List<SaveWorkflowNodeRequest> requestList)
添加工作流节点
|
ResultDTO<Void> |
stopInstance(Long instanceId)
Stop one job instance
|
ResultDTO<Void> |
stopWorkflowInstance(Long wfInstanceId)
Stop one workflow instance
|
public PowerJobClient(String domain, String appName, String password)
domain - like powerjob-server.apple-inc.com (Intranet Domain)appName - name of the applicationpassword - password of the applicationpublic ResultDTO<Long> saveJob(SaveJobInfoRequest request)
saveJob 在接口中 IPowerJobClientrequest - Job meta infopublic ResultDTO<Long> copyJob(Long jobId)
copyJob 在接口中 IPowerJobClientjobId - Job idpublic ResultDTO<SaveJobInfoRequest> exportJob(Long jobId)
exportJob 在接口中 IPowerJobClientpublic ResultDTO<JobInfoDTO> fetchJob(Long jobId)
fetchJob 在接口中 IPowerJobClientjobId - jobIdpublic ResultDTO<List<JobInfoDTO>> fetchAllJob()
fetchAllJob 在接口中 IPowerJobClientpublic ResultDTO<List<JobInfoDTO>> queryJob(JobInfoQuery powerQuery)
queryJob 在接口中 IPowerJobClientpowerQuery - JobQuerypublic ResultDTO<Void> disableJob(Long jobId)
disableJob 在接口中 IPowerJobClientjobId - jobIdpublic ResultDTO<Void> enableJob(Long jobId)
enableJob 在接口中 IPowerJobClientjobId - jobIdpublic ResultDTO<Void> deleteJob(Long jobId)
deleteJob 在接口中 IPowerJobClientjobId - jobIdpublic ResultDTO<Long> runJob(Long jobId, String instanceParams, long delayMS)
runJob 在接口中 IPowerJobClientjobId - ID of the job to be runinstanceParams - Runtime parameters of the job (TaskContext#instanceParams)delayMS - Delay time(Milliseconds)public ResultDTO<Void> stopInstance(Long instanceId)
stopInstance 在接口中 IPowerJobClientinstanceId - instanceIdpublic ResultDTO<Void> cancelInstance(Long instanceId)
cancelInstance 在接口中 IPowerJobClientinstanceId - instanceIdpublic ResultDTO<Void> retryInstance(Long instanceId)
retryInstance 在接口中 IPowerJobClientinstanceId - instanceIdpublic ResultDTO<Integer> fetchInstanceStatus(Long instanceId)
fetchInstanceStatus 在接口中 IPowerJobClientinstanceId - instanceIdInstanceStatuspublic ResultDTO<InstanceInfoDTO> fetchInstanceInfo(Long instanceId)
fetchInstanceInfo 在接口中 IPowerJobClientinstanceId - instanceIdpublic ResultDTO<Long> saveWorkflow(SaveWorkflowRequest request)
saveWorkflow 在接口中 IPowerJobClientrequest - Workflow meta infopublic ResultDTO<Long> copyWorkflow(Long workflowId)
copyWorkflow 在接口中 IPowerJobClientworkflowId - Workflow idpublic ResultDTO<List<WorkflowNodeInfoDTO>> saveWorkflowNode(List<SaveWorkflowNodeRequest> requestList)
saveWorkflowNode 在接口中 IPowerJobClientrequestList - Node info list of Workflowpublic ResultDTO<WorkflowInfoDTO> fetchWorkflow(Long workflowId)
fetchWorkflow 在接口中 IPowerJobClientworkflowId - workflowIdpublic ResultDTO<Void> disableWorkflow(Long workflowId)
disableWorkflow 在接口中 IPowerJobClientworkflowId - workflowIdpublic ResultDTO<Void> enableWorkflow(Long workflowId)
enableWorkflow 在接口中 IPowerJobClientworkflowId - workflowIdpublic ResultDTO<Void> deleteWorkflow(Long workflowId)
deleteWorkflow 在接口中 IPowerJobClientworkflowId - workflowIdpublic ResultDTO<Long> runWorkflow(Long workflowId, String initParams, long delayMS)
runWorkflow 在接口中 IPowerJobClientworkflowId - workflowIdinitParams - workflow startup parametersdelayMS - Delay time(Milliseconds)public ResultDTO<Void> stopWorkflowInstance(Long wfInstanceId)
stopWorkflowInstance 在接口中 IPowerJobClientwfInstanceId - workflow instanceIdpublic ResultDTO<Void> retryWorkflowInstance(Long wfInstanceId)
retryWorkflowInstance 在接口中 IPowerJobClientwfInstanceId - workflow instanceIdpublic ResultDTO<Void> markWorkflowNodeAsSuccess(Long wfInstanceId, Long nodeId)
markWorkflowNodeAsSuccess 在接口中 IPowerJobClientwfInstanceId - workflow instanceIdnodeId - node idpublic ResultDTO<WorkflowInstanceInfoDTO> fetchWorkflowInstanceInfo(Long wfInstanceId)
fetchWorkflowInstanceInfo 在接口中 IPowerJobClientwfInstanceId - workflow instanceIdCopyright © 2024. All rights reserved.