in kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/internal/schedule/JobScheduler.java [77:97]
public JobScheduler(final CoordinatorRegistryCenter regCenter, final ElasticJob elasticJob, final JobConfiguration jobConfig) {
Preconditions.checkArgument(null != elasticJob, "Elastic job cannot be null.");
this.regCenter = regCenter;
String jobClassName = JobClassNameProviderFactory.getProvider().getJobClassName(elasticJob);
this.jobConfig = setUpJobConfiguration(regCenter, jobClassName, jobConfig);
Collection<ElasticJobListener> jobListeners = getElasticJobListeners(this.jobConfig);
setUpFacade = new SetUpFacade(regCenter, this.jobConfig.getJobName(), jobListeners);
schedulerFacade = new SchedulerFacade(regCenter, this.jobConfig.getJobName());
if (1 == this.jobConfig.getShardingTotalCount()
&& "SINGLE_SHARDING_BALANCE".equals(this.jobConfig.getJobShardingStrategyType())) {
jobFacade = new SingleShardingJobFacade(regCenter, this.jobConfig.getJobName(), jobListeners, findTracingConfiguration().orElse(null));
} else {
jobFacade = new ShardingJobFacade(regCenter, this.jobConfig.getJobName(), jobListeners, findTracingConfiguration().orElse(null));
}
validateJobProperties();
jobExecutor = new ElasticJobExecutor(elasticJob, this.jobConfig, jobFacade);
setGuaranteeServiceForElasticJobListeners(regCenter, jobListeners);
jobScheduleController = createJobScheduleController();
}