class AcmScheduler implements ApplicationListener<AbstractConfigurationFileEvent> {

    @Override
    public void onApplicationEvent(AbstractConfigurationFileEvent event)
    {

        if (isConfigurationFileChange(event))
        {
            File configFile = event.getConfigFile();
            try
            {
                synchronized (this)
                {

                    FileTime lastModified = getConfigLastModifiedTime(configFile);
                    // configuration change that originated by update from this scheduler should not be processed.
                    if (lastModifiedTime == lastModified.toMillis())
                    {
                        return;
                    }

                    log.debug("{} confgiration file {} has changed, updating state.", AcmScheduler.class.getName(),
                            SCHEDULED_TASKS_CONFIGUTATION_FILENAME);

                    processSchedulerConfiguration(configFile);
                }
            }
            catch (IOException | JSONException e)
            {
                log.error("Could not load scheduler configuration from file {}, error was: {}.", configFile.getAbsoluteFile(), e);
            }
        }

    }

    public  AcmScheduler(TaskScheduler taskScheduler, TaskExecutor taskExecutor, SpringContextHolder springContextHolder);

}