in kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/internal/schedule/JobScheduler.java [99:118]
public JobScheduler(final CoordinatorRegistryCenter regCenter, final String elasticJobType, final JobConfiguration jobConfig) {
Preconditions.checkArgument(!Strings.isNullOrEmpty(elasticJobType), "Elastic job type cannot be null or empty.");
this.regCenter = regCenter;
this.jobConfig = setUpJobConfiguration(regCenter, elasticJobType, 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(elasticJobType, this.jobConfig, jobFacade);
setGuaranteeServiceForElasticJobListeners(regCenter, jobListeners);
jobScheduleController = createJobScheduleController();
}