|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
Scheduler | Scheduler. |
SchedulerConfiguration | Configuration for the Scheduler . |
SchedulerService |
Class Summary | |
---|---|
SchedulerActivation | Handle the Scheduler activation and passivation. |
SchedulerMixin |
The SLF4J Logger used by this library is named "org.qi4j.library.scheduler".
Use SchedulerAssembler
to add the Scheduler
service to your Application
. This
Assembler provide a fluent api to programmatically configure configuration defaults and activate the
Timeline
service assembly that allow to browse in past and future Task
runs.
Here is a full example:
new SchedulerAssembler(). visibleIn( Visibility.layer ). withConfigAssembly( configModuleAssembly ). withPulseRhythm( 60 ). withGarbageCollectorRhythm( 600 ). withTimeline(). assemble( moduleAssembly );
See SchedulerConfiguration
for configuration properties details, the values show above are the defaults.
To write a schedulable Task, compose an EntityComposite using Task
to be able to schedule it.
A Task is wrapped in a ScheduleRunner
before being run by SchedulerWorkQueue
.
ScheduleRunner
wrap a UnitOfWork
around the Task#run()
invocation.
Here is a simple example:
interface MyTaskEntity extends Task, EntityComposite { Property<String> customState(); Association<AnotherEntity> anotherEntity(); } abstract class MyTaskMixin implements Runnable {
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |