| 构造器和说明 |
|---|
LiteJobFacade(CoordinatorRegistryCenter regCenter,
String jobName,
List<ElasticJobListener> elasticJobListeners,
JobEventBus jobEventBus) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
afterJobExecuted(ShardingContexts shardingContexts)
作业执行后的执行的方法.
|
void |
beforeJobExecuted(ShardingContexts shardingContexts)
作业执行前的执行的方法.
|
void |
checkJobExecutionEnvironment()
检查作业执行环境.
|
void |
clearMisfire(Collection<Integer> shardingItems)
清除任务被错过执行的标记.
|
void |
failoverIfNecessary()
如果需要失效转移, 则执行作业失效转移.
|
ShardingContexts |
getShardingContexts()
获取当前作业服务器的分片上下文.
|
boolean |
isEligibleForJobRunning()
判断作业是否符合继续运行的条件.
|
boolean |
isExecuteMisfired(Collection<Integer> shardingItems)
判断作业是否需要执行错过的任务.
|
boolean |
isNeedSharding()
判断是否需要重分片.
|
LiteJobConfiguration |
loadJobRootConfiguration(boolean fromCache)
读取作业配置.
|
boolean |
misfireIfRunning(Collection<Integer> shardingItems)
设置任务被错过执行的标记.
|
void |
postJobExecutionEvent(JobExecutionEvent jobExecutionEvent)
发布执行事件.
|
void |
postJobStatusTraceEvent(String taskId,
JobStatusTraceEvent.State state,
String message)
发布作业状态追踪事件.
|
void |
registerJobBegin(ShardingContexts shardingContexts)
注册作业启动信息.
|
void |
registerJobCompleted(ShardingContexts shardingContexts)
注册作业完成信息.
|
public LiteJobFacade(CoordinatorRegistryCenter regCenter, String jobName, List<ElasticJobListener> elasticJobListeners, JobEventBus jobEventBus)
public LiteJobConfiguration loadJobRootConfiguration(boolean fromCache)
JobFacadeloadJobRootConfiguration 在接口中 JobFacadefromCache - 是否从缓存中读取public void checkJobExecutionEnvironment()
throws JobExecutionEnvironmentException
JobFacadecheckJobExecutionEnvironment 在接口中 JobFacadeJobExecutionEnvironmentException - 作业执行环境异常public void failoverIfNecessary()
JobFacadefailoverIfNecessary 在接口中 JobFacadepublic void registerJobBegin(ShardingContexts shardingContexts)
JobFacaderegisterJobBegin 在接口中 JobFacadeshardingContexts - 分片上下文public void registerJobCompleted(ShardingContexts shardingContexts)
JobFacaderegisterJobCompleted 在接口中 JobFacadeshardingContexts - 分片上下文public ShardingContexts getShardingContexts()
JobFacadegetShardingContexts 在接口中 JobFacadepublic boolean misfireIfRunning(Collection<Integer> shardingItems)
JobFacademisfireIfRunning 在接口中 JobFacadeshardingItems - 需要设置错过执行的任务分片项public void clearMisfire(Collection<Integer> shardingItems)
JobFacadeclearMisfire 在接口中 JobFacadeshardingItems - 需要清除错过执行的任务分片项public boolean isExecuteMisfired(Collection<Integer> shardingItems)
JobFacadeisExecuteMisfired 在接口中 JobFacadeshardingItems - 任务分片项集合public boolean isEligibleForJobRunning()
JobFacade如果作业停止或需要重分片或非流式处理则作业将不会继续运行.
isEligibleForJobRunning 在接口中 JobFacadepublic boolean isNeedSharding()
JobFacadeisNeedSharding 在接口中 JobFacadepublic void beforeJobExecuted(ShardingContexts shardingContexts)
JobFacadebeforeJobExecuted 在接口中 JobFacadeshardingContexts - 分片上下文public void afterJobExecuted(ShardingContexts shardingContexts)
JobFacadeafterJobExecuted 在接口中 JobFacadeshardingContexts - 分片上下文public void postJobExecutionEvent(JobExecutionEvent jobExecutionEvent)
JobFacadepostJobExecutionEvent 在接口中 JobFacadejobExecutionEvent - 作业执行事件public void postJobStatusTraceEvent(String taskId, JobStatusTraceEvent.State state, String message)
JobFacadepostJobStatusTraceEvent 在接口中 JobFacadetaskId - 作业Idstate - 作业执行状态message - 作业执行消息Copyright © 2019. All rights reserved.