Class ScheduledJobHandler
- java.lang.Object
-
- org.apache.sling.event.impl.jobs.scheduling.ScheduledJobHandler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classScheduledJobHandler.Holder
-
Constructor Summary
Constructors Constructor Description ScheduledJobHandler(JobManagerConfiguration configuration, JobSchedulerImpl jobScheduler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScheduledJobInfoImpladdOrUpdateJob(String jobTopic, Map<String,Object> jobProperties, String scheduleName, boolean suspend, List<ScheduleInfoImpl> scheduleInfos)Write a scheduled job to the resource tree.voidbundleEvent()A bundle event occurred which means we can try loading jobs that previously failed because of missing classes.voiddeactivate()voidhandleAddUpdate(String path)Handle observation event for adding or updating a scheduled jobvoidhandleRemove(String path)Handle observation event for removing a scheduled jobvoidmaintenance()voidremove(ScheduledJobInfoImpl info)Remove a scheduled jobvoidrun()voidupdateSchedule(String scheduleName, Collection<org.apache.sling.event.jobs.ScheduleInfo> scheduleInfo)
-
-
-
Constructor Detail
-
ScheduledJobHandler
public ScheduledJobHandler(JobManagerConfiguration configuration, JobSchedulerImpl jobScheduler)
- Parameters:
configuration- Current job manager configuration
-
-
Method Detail
-
deactivate
public void deactivate()
-
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()
-
-