Class Site
- java.lang.Object
-
- edu.isi.pegasus.planner.selector.site.heft.Site
-
public class Site extends java.lang.ObjectA data class that models a site as a collection of processors. The number of processors can only be specified in the constructor.- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Field Summary
Fields Modifier and Type Field Description private intmCurrentProcessorIndexThe index to the processor that is to be used for scheduling a job.private java.lang.StringmNameThe logical name assigned to the site.private intmNumProcessorsThe number of processors making up a site.private java.util.ListmProcessorsA list of processors making up the site.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAvailableProcessors()Returns the number of available processors.longgetAvailableTime(long start)Returns the earliest time the site is available for scheduling a job.java.lang.StringgetName()Returns the name of the site.voidscheduleJob(long start, long end)Schedules a job to the site.
-
-
-
Field Detail
-
mNumProcessors
private int mNumProcessors
The number of processors making up a site.
-
mProcessors
private java.util.List mProcessors
A list of processors making up the site.
-
mCurrentProcessorIndex
private int mCurrentProcessorIndex
The index to the processor that is to be used for scheduling a job.
-
mName
private java.lang.String mName
The logical name assigned to the site.
-
-
Constructor Detail
-
Site
public Site(java.lang.String name)
The default constructor.- Parameters:
name- the name to be assigned to the site.
-
Site
public Site(java.lang.String name, int num)The overloaded constructor.- Parameters:
name- the name to be assigned to the site.num- the number of processors.
-
-
Method Detail
-
getAvailableTime
public long getAvailableTime(long start)
Returns the earliest time the site is available for scheduling a job. It is non insertion based scheduling policy.- Parameters:
start- the time at which to start the search.- Returns:
- long
-
scheduleJob
public void scheduleJob(long start, long end)Schedules a job to the site.- Parameters:
start- the start time of the job.end- the end time for the job
-
getName
public java.lang.String getName()
Returns the name of the site.- Returns:
- name of the site.
-
getAvailableProcessors
public int getAvailableProcessors()
Returns the number of available processors.- Returns:
- number of available processors.
-
-