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

# Class JobReschedulingManager

java.lang.Object
org.apache.sling.event.impl.jobs.queues.JobReschedulingManager

public class JobReschedulingManager extends Object
A centralized service to manage the delay after which tasks are executed. This service is used to reschedule failed jobs, which are submitted to the queue again after the delay has passed. For that reason the threadpool to manage that delay is quite small, as the re-submission of the jobs into their respective queues is fast.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static @interface`
`JobReschedulingManager.Config`

## Constructor Summary

Constructors
Constructor
Description
`JobReschedulingManager()`

## Method Summary

Modifier and Type
Method
Description
`void`
`activate(JobReschedulingManager.Config config)`
`void`
`deactivate()`
`void`
`reschedule(Runnable task, long delayInMilis)`
Start the provided task with a delay in a fire and forgot way

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

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

## Constructor Details

### JobReschedulingManager

public JobReschedulingManager()

## Method Details

### activate

public void activate(JobReschedulingManager.Config config)

### deactivate

public void deactivate()

### reschedule

public void reschedule(Runnable task, long delayInMilis)
Start the provided task with a delay in a fire and forgot way

Parameters:
  `task` - the task to execute
  `delayInMilis` - the delay in milliseconds