public class FixedFrequencyScheduler<T extends Runnable> extends PollScheduler<T>
Scheduler that runs a task giving a fixed period of time.
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
logger |
job, namePHASE_NAMEPHASE_NAMEPHASE_NAMEPHASE_NAME| Constructor and Description |
|---|
FixedFrequencyScheduler(String name,
long frequency,
long startDelay,
T job,
TimeUnit timeUnit) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Checks that the
executor is terminated and, if not, it terminates the
scheduling abruptly |
long |
getFrequency() |
TimeUnit |
getTimeUnit() |
void |
initialise()
Creates the
executor that is going to be used to launch schedules |
void |
schedule()
Executes the the
Scheduler task |
void |
start()
Starts the Scheduling of a Task.
|
void |
stop()
Stops the Scheduling of a Task.
|
getName, setNamepublic void initialise()
throws InitialisationException
Creates the executor that is going to be used to launch schedules
InitialisationException - if a fatal error occurs causing the Mule instance to shutdownRecoverableException - if an error occurs that can be recovered frompublic void start()
throws MuleException
Starts the Scheduling of a Task. Can be called several times, if the Scheduler is already started or
if it is starting then the start request is omitted
MuleExceptionpublic void stop()
throws MuleException
Stops the Scheduling of a Task. Can be called several times, if the Scheduler is already stopped or
if it is stopping then the stop request is omitted
MuleExceptionpublic void schedule()
throws MuleException
Executes the the Scheduler task
MuleExceptionpublic void dispose()
Checks that the executor is terminated and, if not, it terminates the
scheduling abruptly
public long getFrequency()
public TimeUnit getTimeUnit()
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.