edu.isi.pegasus.planner.selector.site.heft
Class Site

java.lang.Object
  extended by edu.isi.pegasus.planner.selector.site.heft.Site

public class Site
extends Object

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: 2050 $
Author:
Karan Vahi

Field Summary
private  int mCurrentProcessorIndex
          The index to the processor that is to be used for scheduling a job.
private  String mName
          The logical name assigned to the site.
private  int mNumProcessors
          The number of processors making up a site.
private  List mProcessors
          A list of processors making up the site.
 
Constructor Summary
Site(String name)
          The default constructor.
Site(String name, int num)
          The overloaded constructor.
 
Method Summary
 int getAvailableProcessors()
          Returns the number of available processors.
 long getAvailableTime(long start)
          Returns the earliest time the site is available for scheduling a job.
 String getName()
          Returns the name of the site.
 void scheduleJob(long start, long end)
          Schedules a job to the site.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mNumProcessors

private int mNumProcessors
The number of processors making up a site.


mProcessors

private 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 String mName
The logical name assigned to the site.

Constructor Detail

Site

public Site(String name)
The default constructor.

Parameters:
name - the name to be assigned to the site.

Site

public Site(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 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.


Copyright © 2011 The University of Southern California. All Rights Reserved.