class ScheduledJobExecutor implements ApplicationContextAware {

    public void registerScheduledJob(@NonNull ScheduledJob scheduledJob) {
        if(!scheduledJobIdMap.containsKey(scheduledJob)) {
           var jobIdentifier = scheduledJob.getJobIdentifier();
           if(Objects.isNull(jobIdentifier)) {
               throw new IllegalArgumentException("A job's identifier can't be null!");
           }

           var trimmedJobIdentifier = jobIdentifier.trim();
           if(trimmedJobIdentifier.isEmpty()) {
               throw new IllegalArgumentException("A job's identifier can't contain only whitespace!");
           }

           if(scheduledJobIdMap.containsValue(trimmedJobIdentifier)) {
               throw new IllegalStateException(String.format("Multiple scheduled jobs with the same job identifier '%s' found!",
                       trimmedJobIdentifier));
           }

           scheduledJobIdMap.put(scheduledJob, trimmedJobIdentifier);

           log.debug(String.format("Added scheduled job (%s) with job identifier '%s'!",
                   scheduledJob.getClass().getName(),
                   jobIdentifier));
        }
    }

    @Autowired public  ScheduledJobExecutor(ScheduledJobLogRepository jobLogRepo, Clock clock);

}