org.objectweb.deployment.scheduling.core.lib
Class BasicScheduler

java.lang.Object
  extended by org.objectweb.deployment.scheduling.core.lib.BasicScheduler
All Implemented Interfaces:
Scheduler

public class BasicScheduler
extends Object
implements Scheduler

BasicScheduler implements Scheduler.

Version:
0.2
Author:
Philippe Merle, Frédéric Briclet

Constructor Summary
BasicScheduler()
          The default constructor.
 
Method Summary
protected  void doSchedule(Task[] tasks, Object context)
          Schedule an array of tasks.
protected  Task[] prepareScheduling(Task[] tasks)
          Prepare scheduling.
 void schedule(Task[] tasks, Object context)
          Schedule an array of tasks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicScheduler

public BasicScheduler()
The default constructor.

Method Detail

prepareScheduling

protected Task[] prepareScheduling(Task[] tasks)
Prepare scheduling. TODO: Must be optimized and must detect cycle dependencies between tasks.

Parameters:
tasks - - The tasks to schedule.
Returns:
The scheduled tasks.

doSchedule

protected void doSchedule(Task[] tasks,
                          Object context)
Schedule an array of tasks.

Parameters:
tasks - - The array of tasks to schedule.
context - - The execution context.

schedule

public void schedule(Task[] tasks,
                     Object context)
Schedule an array of tasks.

Specified by:
schedule in interface Scheduler
Parameters:
tasks - - The array of tasks to schedule.