Package org.apache.sling.discovery.base.commons

# 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 Summary

Constructors
Constructor
Description
`PeriodicBackgroundJob(long intervalSeconds, String threadName, Runnable runnable)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`isStopped()`
`boolean`
`isStopping()`
`void`
`run()`
`void`
`stop()`

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

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

## 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`