org.apache.tapestry5.ioc.internal.services.cron
Class PeriodicExecutorImpl
java.lang.Object
org.apache.tapestry5.ioc.internal.services.cron.PeriodicExecutorImpl
- All Implemented Interfaces:
- Runnable, PeriodicExecutor
public class PeriodicExecutorImpl
- extends Object
- implements PeriodicExecutor, Runnable
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PeriodicExecutorImpl
public PeriodicExecutorImpl(ParallelExecutor parallelExecutor,
org.slf4j.Logger logger)
start
@PostInjection
public void start(RegistryShutdownHub hub)
addJob
public PeriodicJob addJob(Schedule schedule,
String name,
Runnable job)
- Description copied from interface:
PeriodicExecutor
- Adds a job to be executed. The job is executed in a thread pool (via
ParallelExecutor.invoke(org.apache.tapestry5.ioc.Invokable)
), as determined by the schedule.
- Specified by:
addJob
in interface PeriodicExecutor
- Parameters:
schedule
- defines when the job will next executename
- a name used in debugging output related to the jobjob
- a Runnable object that represents the work to be done
- Returns:
- a PeriodicJob that can be used to query when the job executes, or to cancel its execution
run
public void run()
- Specified by:
run
in interface Runnable
Copyright © 2003-2012 The Apache Software Foundation.