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