org.gridbus.broker.scheduler
Class Scheduler

java.lang.Object
  extended byorg.gridbus.broker.scheduler.Scheduler
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
DataScheduler, DBScheduler

public abstract class Scheduler
extends java.lang.Object
implements java.lang.Runnable

This is the base scheduler class, and contains main methods for performing the scheduling/

Version:
2.0
Author:
Srikumar Venugopal (srikumar@cs.mu.oz.au)

Field Summary
static int POLLTIME
          Interval for polling job status
 
Constructor Summary
Scheduler(GridbusFarmingEngine fe)
          Constructor for the Scheduler
 
Method Summary
 boolean isClassValid()
          Returns if the current class is a valid one.
 boolean isFailed()
           
 boolean isFinished()
          Returns whether the scheduling is finished.
 void run()
          The run method enables the scheduler to run as a seperate thread, and calls the 'schedule()' method.
abstract  void schedule()
          Abstract method: schedule to be implemented by derived classes which implement various scheduling algorithms.
 void setFailed(boolean failed)
           
 void setFinished(boolean b)
          Sets the 'finished' state of the scheduler.
 void sort(java.util.Vector server_vect)
          Sorts the compute server list by cost
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POLLTIME

public static final int POLLTIME
Interval for polling job status

See Also:
Constant Field Values
Constructor Detail

Scheduler

public Scheduler(GridbusFarmingEngine fe)
Constructor for the Scheduler

Parameters:
fe - - Farming Engine
Method Detail

sort

public void sort(java.util.Vector server_vect)
Sorts the compute server list by cost

Parameters:
server_vect -

run

public void run()
The run method enables the scheduler to run as a seperate thread, and calls the 'schedule()' method.

Specified by:
run in interface java.lang.Runnable
See Also:
Runnable.run()

isFailed

public boolean isFailed()
Returns:
Returns the failed.

setFailed

public void setFailed(boolean failed)
Parameters:
failed - The failed to set.

isClassValid

public boolean isClassValid()
Returns if the current class is a valid one. This is used to avoid class loader problems with Tomcat.

Returns:
boolean

schedule

public abstract void schedule()
Abstract method: schedule to be implemented by derived classes which implement various scheduling algorithms.


isFinished

public boolean isFinished()
Returns whether the scheduling is finished.

Returns:
boolean

setFinished

public void setFinished(boolean b)
Sets the 'finished' state of the scheduler.

Parameters:
b - - boolean