Package org.apache.sling.event.impl.jobs.scheduling

# Class ScheduledJobHandler

java.lang.Object
org.apache.sling.event.impl.jobs.scheduling.ScheduledJobHandler

All Implemented Interfaces:
  `Runnable`

public class ScheduledJobHandler extends Object implements Runnable

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static final class`
`ScheduledJobHandler.Holder`

## Constructor Summary

Constructors
Constructor
Description
`ScheduledJobHandler(JobManagerConfiguration configuration, JobSchedulerImpl jobScheduler)`

## Method Summary

Modifier and Type
Method
Description
`ScheduledJobInfoImpl`
`addOrUpdateJob(String jobTopic, Map<String,Object> jobProperties, String scheduleName, boolean suspend, List<ScheduleInfoImpl> scheduleInfos)`
Write a scheduled job to the resource tree.
`void`
`bundleEvent()`
A bundle event occurred which means we can try loading jobs that previously failed because of missing classes.
`void`
`deactivate()`
`void`
`handleAddUpdate(String path)`
Handle observation event for adding or updating a scheduled job
`void`
`handleRemove(String path)`
Handle observation event for removing a scheduled job
`void`
`maintenance()`
`void`
`remove(ScheduledJobInfoImpl info)`
Remove a scheduled job
`void`
`run()`
`void`
`updateSchedule(String scheduleName, Collection<org.apache.sling.event.jobs.ScheduleInfo> scheduleInfo)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ScheduledJobHandler

public ScheduledJobHandler(JobManagerConfiguration configuration, JobSchedulerImpl jobScheduler)

Parameters:
  `configuration` - Current job manager configuration

## Method Details

### 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()