Class Site
java.lang.Object
edu.isi.pegasus.planner.selector.site.heft.Site
A 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the number of available processors.long
getAvailableTime
(long start) Returns the earliest time the site is available for scheduling a job.getName()
Returns the name of the site.void
scheduleJob
(long start, long end) Schedules a job to the site.
-
Field Details
-
mNumProcessors
private int mNumProcessorsThe number of processors making up a site. -
mProcessors
A list of processors making up the site. -
mCurrentProcessorIndex
private int mCurrentProcessorIndexThe index to the processor that is to be used for scheduling a job. -
mName
The logical name assigned to the site.
-
-
Constructor Details
-
Site
The default constructor.- Parameters:
name
- the name to be assigned to the site.
-
Site
The overloaded constructor.- Parameters:
name
- the name to be assigned to the site.num
- the number of processors.
-
-
Method Details
-
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
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.
-