Class ScheduledJobHandler

    • Constructor Detail

    • Method Detail

      • deactivate

        public void deactivate()
      • run

        public void run()
        Specified by:
        run in interface Runnable
      • addOrUpdateJob

        public ScheduledJobInfoImpl addOrUpdateJob​(String jobTopic,
                                                   Map<String,​Object> jobProperties,
                                                   String scheduleName,
                                                   boolean suspend,
                                                   List<ScheduleInfoImpl> scheduleInfos)
                                            throws org.apache.sling.api.resource.PersistenceException
        Write a scheduled job to the resource tree.
        Throws:
        org.apache.sling.api.resource.PersistenceException
      • bundleEvent

        public void bundleEvent()
        A bundle event occurred which means we can try loading jobs that previously failed because of missing classes.
      • handleRemove

        public void handleRemove​(String path)
        Handle observation event for removing a scheduled job
        Parameters:
        path - The path to the job
      • handleAddUpdate

        public void handleAddUpdate​(String path)
        Handle observation event for adding or updating a scheduled job
        Parameters:
        path - The path to the job
      • remove

        public void remove​(ScheduledJobInfoImpl info)
        Remove a scheduled job
        Parameters:
        info - The schedule info
      • updateSchedule

        public void updateSchedule​(String scheduleName,
                                   Collection<org.apache.sling.event.jobs.ScheduleInfo> scheduleInfo)
      • maintenance

        public void maintenance()