gov.bnl.star.offline.scheduler
Class Scheduler

java.lang.Object
  extended by gov.bnl.star.offline.scheduler.Scheduler

public class Scheduler
extends java.lang.Object

A scheduler able to verify a job description, chosing the target machine according to a policy and dispatch the job.

To create a scheduler, one has to specify a JobInitializer, a Policy and a Dispatcher. When submitting a request, the job description will be passed to the JobInitializer which will return an array of JobRequests. These will be passed one by one to the Policy and then to the Dispatcher.

By keeping the three function separate from each other, it is possible to change the underlying queue manager (LSF, Condor, Globus, ... ), policy or job description specifications.

Version:
$Revision: 1.26 $ $Date: 2006/11/21 00:41:32 $
Author:
Gabriele Carcassi

Constructor Summary
Scheduler(JobInitializer initializer, Policy policy, Dispatcher dispatcher)
          Creates a new scheduler, putting together an initalizer, a policy and a dispatcher.
Scheduler(java.lang.String initializerClassName, java.lang.String policyClassName, java.lang.String dispatcherClassName)
          Creates a new scheduler, putting together an initalizer, a policy and a dispatcher.
 
Method Summary
 java.util.List getJobs()
           
 Request[] getRequests()
           
 void submit(java.lang.String xmlFileName)
          Submits a job through the scheduler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Scheduler

public Scheduler(JobInitializer initializer,
                 Policy policy,
                 Dispatcher dispatcher)
Creates a new scheduler, putting together an initalizer, a policy and a dispatcher.

Parameters:
initializer - the part of the scheduler that will create the JobRequests from the xml file
policy - the part of the scheduler that will decide how and where to execute the jobs
dispatcher - the part of the scheduler that will dispatch the processes to the underlying queue

Scheduler

public Scheduler(java.lang.String initializerClassName,
                 java.lang.String policyClassName,
                 java.lang.String dispatcherClassName)
Creates a new scheduler, putting together an initalizer, a policy and a dispatcher. In this constructor you specify the class names instead of the objects. This allows complete real time configuration of any part of the scheduler.

Every class specified must have a default constructor.

Parameters:
initializerClassName - the class name of a class inheriting from JobInitializer
policyClassName - the class name of a class inheriting from Policy
dispatcherClassName - the class name of a class inheriting from Dispatcher
Method Detail

submit

public void submit(java.lang.String xmlFileName)
Submits a job through the scheduler. Analizes the xml file, and dispatches the job according to the policy.

Parameters:
xmlFileName - the filename of the job description

getRequests

public Request[] getRequests()

getJobs

public java.util.List getJobs()


Copyright © 2002-2004 STAR collaboration - Brookhaven National Laboratory. All Rights Reserved.