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.
  • 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