public class ExecutionService extends Object
| 构造器和说明 |
|---|
ExecutionService(CoordinatorRegistryCenter coordinatorRegistryCenter,
JobConfiguration jobConfiguration) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clearMisfire(List<Integer> items)
清除任务被错过执行的标记.
|
void |
clearRunningInfo(List<Integer> items)
清除分配分片序列号的运行状态.
|
List<Integer> |
getMisfiredJobItems(List<Integer> items)
获取标记被错过执行的任务分片项.
|
boolean |
hasRunningItems()
判断是否还有执行中的作业.
|
boolean |
hasRunningItems(List<Integer> items)
判断分片项中是否还有执行中的作业.
|
boolean |
isCompleted(int item)
判断该分片是否已完成.
|
boolean |
misfireIfNecessary(List<Integer> items)
如果满足条件,设置任务被错过执行的标记.
|
void |
registerJobBegin(JobExecutionMultipleShardingContext jobExecutionShardingContext)
注册作业启动信息.
|
void |
registerJobCompleted(JobExecutionMultipleShardingContext jobExecutionShardingContext)
注册作业完成信息.
|
void |
removeExecutionInfo()
删除作业执行时信息.
|
void |
setMisfire(List<Integer> items)
设置任务被错过执行的标记.
|
void |
setNeedFixExecutionInfoFlag()
设置修复运行时分片信息标记的状态标志位.
|
public ExecutionService(CoordinatorRegistryCenter coordinatorRegistryCenter, JobConfiguration jobConfiguration)
public void registerJobBegin(JobExecutionMultipleShardingContext jobExecutionShardingContext)
jobExecutionShardingContext - 作业运行时分片上下文public void registerJobCompleted(JobExecutionMultipleShardingContext jobExecutionShardingContext)
jobExecutionShardingContext - 作业运行时分片上下文public void setNeedFixExecutionInfoFlag()
public void clearRunningInfo(List<Integer> items)
用于作业服务器恢复连接注册中心而重新上线的场景, 先清理上次运行时信息.
items - 需要清理的分片项列表public boolean misfireIfNecessary(List<Integer> items)
items - 需要设置错过执行的任务分片项public List<Integer> getMisfiredJobItems(List<Integer> items)
items - 需要获取标记被错过执行的任务分片项public void removeExecutionInfo()
public boolean isCompleted(int item)
item - 运行中的分片路径public boolean hasRunningItems(List<Integer> items)
items - 需要判断的分片项列表public boolean hasRunningItems()
Copyright © 2016. All rights reserved.