Class PeriodicBackgroundJob

java.lang.Object
org.apache.sling.discovery.base.commons.PeriodicBackgroundJob
All Implemented Interfaces:
Runnable

public class PeriodicBackgroundJob extends Object implements Runnable
Simple executor of a background job that periodically invokes a particular runnable - catching RuntimeExceptions that might throw - but not catching Errors (that terminates the BackgroundJob).
  • Constructor Details

    • PeriodicBackgroundJob

      public PeriodicBackgroundJob(long intervalSeconds, String threadName, Runnable runnable)
  • Method Details

    • stop

      public void stop()
    • isStopping

      public boolean isStopping()
    • isStopped

      public boolean isStopped()
    • run

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