|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.oozie.service.SchedulerService
public class SchedulerService
This service executes scheduled Runnables and Callables at regular intervals.
It uses a java.util.concurrent.ScheduledExecutorService. TheSCHEDULER_THREADS configuration property indicates
how many threads the scheduler will use to run scheduled commands.
| Nested Class Summary | |
|---|---|
static class |
SchedulerService.Unit
|
| Field Summary | |
|---|---|
static String |
CONF_PREFIX
|
static String |
SCHEDULER_THREADS
|
| Fields inherited from interface org.apache.oozie.service.Service |
|---|
DEFAULT_LOCK_TIMEOUT, lockTimeout, USE_XCOMMAND |
| Constructor Summary | |
|---|---|
SchedulerService()
|
|
| Method Summary | |
|---|---|
void |
destroy()
Destroy the scheduler service. |
Class<? extends Service> |
getInterface()
Return the public interface for scheduler service. |
ScheduledExecutorService |
getScheduler()
Return the java.util.concurrent.ScheduledExecutorService instance used by the SchedulerService. |
void |
init(Services services)
Initialize the scheduler service. |
void |
schedule(Callable<Void> callable,
long delay,
long interval,
SchedulerService.Unit unit)
Schedule a Callable for execution. |
void |
schedule(Runnable runnable,
long delay,
long interval,
SchedulerService.Unit unit)
Schedule a Runnable for execution. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CONF_PREFIX
public static final String SCHEDULER_THREADS
| Constructor Detail |
|---|
public SchedulerService()
| Method Detail |
|---|
public void init(Services services)
init in interface Serviceservices - services instance.public void destroy()
destroy in interface Servicepublic Class<? extends Service> getInterface()
getInterface in interface ServiceSchedulerService.public ScheduledExecutorService getScheduler()
public void schedule(Callable<Void> callable,
long delay,
long interval,
SchedulerService.Unit unit)
callable - callable to schedule for execution.delay - delay for first execution since scheduling.interval - interval between executions.unit - scheduling unit.
public void schedule(Runnable runnable,
long delay,
long interval,
SchedulerService.Unit unit)
runnable - Runnable to schedule for execution.delay - delay for first execution since scheduling.interval - interval between executions.unit - scheduling unit.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||