|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gridbus.broker.common.Scheduler
public abstract class Scheduler
This is the base scheduler class, and contains main methods for performing the scheduling
| Field Summary | |
|---|---|
protected java.lang.String |
applicationID
|
protected boolean |
failed
|
protected boolean |
feasible
|
protected boolean |
finished
|
protected int |
numPoll
|
protected long |
pollTime
|
protected BrokerStorage |
store
|
protected long |
timeStart
|
protected JobStatistics |
totalStats
|
protected boolean |
userMarketDir
|
protected boolean |
useSoftwareCost
|
| Constructor Summary | |
|---|---|
Scheduler(java.lang.String applicationID)
Constructor for the Scheduler |
|
| Method Summary | |
|---|---|
protected void |
freeQueueSlot(Job job)
|
protected java.util.List |
getCandidateSCSServers(org.gridbus.scs.common.SCSJob job)
|
protected java.util.List |
getCandidateServers(Job job)
|
protected void |
getJobStatsFromStore()
Gets the job stats into counters in memory |
java.lang.String |
getKey()
Returns the name of the scheduler |
protected Job |
getNextReadyJob()
|
protected org.gridbus.scs.common.SCSJob |
getNextReadySCSJob()
|
long |
getPollTime()
|
protected java.util.List |
getReadyServers()
|
protected void |
groupServers(java.util.ArrayList grpSrvLst,
java.util.List servers)
Groups the servers into an arrayList of vectors based on their pricePerJob |
protected boolean |
isClassValid()
Returns if the current class is a valid one. |
boolean |
isFailed()
|
boolean |
isFeasible()
|
boolean |
isFinished()
Returns whether the scheduling is finished. |
protected boolean |
isJobRequirementMet(Job job,
ComputeServer server)
|
protected boolean |
isSCSJobRequirementMet(org.gridbus.scs.common.SCSJob job,
ComputeServer server)
|
void |
jobReset(Job job)
Job is reset |
void |
run()
The run method enables the scheduler to run as a seperate thread, and calls the 'schedule()' method. |
protected boolean |
saveJobMapping(Job job,
ComputeServer server)
Maps the given job to the given server. |
protected boolean |
saveJobMapping(org.gridbus.scs.common.SCSJob job,
ComputeServer server)
|
protected void |
saveStatusEvent(Job job)
|
protected void |
saveStatusEvent(org.gridbus.scs.common.SCSJob job)
|
protected abstract void |
schedule()
Abstract method: schedule to be implemented by derived classes which implement various scheduling algorithms. |
protected void |
setFailed()
|
protected void |
setFeasible(boolean feasible)
|
protected void |
setFinished()
Sets the 'finished' state of the scheduler. |
protected void |
sortByCost(java.util.List servers)
Sorts the compute server list by cost (ascending order: cheapest first) |
protected void |
sortByRunningJobs(java.util.List servers)
Sorts the compute server list by running jobs (ascending order of running jobs) |
protected void |
sortByTime(java.util.List servers)
Sorts the compute server list by time (ascending order of job-computation time: fastest first) |
void |
statusChanged(Job job)
Status changed event for a Job |
void |
statusChanged(org.gridbus.scs.common.SCSJob job)
SCS Job : Tom |
protected void |
updateJobStatus(Job job,
int status)
|
protected void |
updateQos(Qos qos,
float budgetspent,
long timespent)
Wrapper method for derived scheduler to update the qos |
protected void |
updateServerPerformance(Job job)
|
protected void |
updateStats()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String applicationID
protected BrokerStorage store
protected JobStatistics totalStats
protected long pollTime
protected int numPoll
protected boolean finished
protected boolean failed
protected boolean feasible
protected boolean useSoftwareCost
protected boolean userMarketDir
protected long timeStart
| Constructor Detail |
|---|
public Scheduler(java.lang.String applicationID)
throws GridBrokerException
applicationID -
GridBrokerException| Method Detail |
|---|
public final java.lang.String getKey()
protected void sortByTime(java.util.List servers)
servers - protected void sortByRunningJobs(java.util.List servers)
servers - protected void sortByCost(java.util.List servers)
servers -
protected void groupServers(java.util.ArrayList grpSrvLst,
java.util.List servers)
grpSrvLst - servers -
protected void getJobStatsFromStore()
throws GridBrokerException
GridBrokerExceptionpublic final void run()
run in interface java.lang.RunnableRunnable.run()public boolean isFailed()
protected void setFailed()
throws GridBrokerException
GridBrokerExceptionprotected boolean isClassValid()
protected abstract void schedule()
throws java.lang.Exception
java.lang.Exceptionpublic boolean isFinished()
protected void setFinished()
public long getPollTime()
public boolean isFeasible()
protected void setFeasible(boolean feasible)
feasible - The feasible to set.
protected boolean saveJobMapping(Job job,
ComputeServer server)
protected boolean saveJobMapping(org.gridbus.scs.common.SCSJob job,
ComputeServer server)
protected boolean isSCSJobRequirementMet(org.gridbus.scs.common.SCSJob job,
ComputeServer server)
protected void freeQueueSlot(Job job)
protected boolean isJobRequirementMet(Job job,
ComputeServer server)
protected java.util.List getCandidateSCSServers(org.gridbus.scs.common.SCSJob job)
throws GridBrokerException
GridBrokerException
protected java.util.List getCandidateServers(Job job)
throws GridBrokerException
GridBrokerException
protected org.gridbus.scs.common.SCSJob getNextReadySCSJob()
throws GridBrokerException
GridBrokerException
protected Job getNextReadyJob()
throws GridBrokerException
GridBrokerExceptionpublic void jobReset(Job job)
JobListener
jobReset in interface JobListenerpublic void statusChanged(Job job)
JobListener
statusChanged in interface JobListenerJobListener.statusChanged(org.gridbus.broker.common.Job)public void statusChanged(org.gridbus.scs.common.SCSJob job)
JobListener
statusChanged in interface JobListenerJobListener.statusChanged(org.gridbus.scs.common.SCSJob)
protected void saveStatusEvent(org.gridbus.scs.common.SCSJob job)
throws GridBrokerException
GridBrokerException
protected void saveStatusEvent(Job job)
throws GridBrokerException
GridBrokerException
protected void updateServerPerformance(Job job)
throws GridBrokerException
GridBrokerExceptionprotected void updateStats()
protected void updateQos(Qos qos,
float budgetspent,
long timespent)
qos - budgetspent - timespent -
protected java.util.List getReadyServers()
throws GridBrokerException
GridBrokerException
protected void updateJobStatus(Job job,
int status)
throws GridBrokerException
GridBrokerException
|
Copyright © The University of Melbourne. 2006 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||