GridSim 5.0 beta

gridsim.parallel.profile
Class SingleProfileEntry

Object
  extended by ProfileEntry
      extended by SingleProfileEntry
All Implemented Interfaces:
Comparable<ProfileEntry>

public class SingleProfileEntry
extends ProfileEntry

The SingleProfileEntry class represents an entry in the availability profile. It contains the list of ranges of PEs available at a particular time. This time may represent either the start time or completion of a job or advance reservation.

Since:
5.0
Author:
Marcos Dias de Assuncao
See Also:
PERange, PERangeList, SingleProfile

Constructor Summary
SingleProfileEntry(double time)
          Creates a new instance of SingleProfileEntry
SingleProfileEntry(double time, PERangeList ranges)
          Creates a new instance of SingleProfileEntry
 
Method Summary
 boolean addRanges(PERangeList list)
          Adds the ranges provided to the list of ranges available
 SingleProfileEntry clone(double time)
          Returns a clone of this entry.
 PERangeList getAvailRanges()
          Returns the list of ranges available at this entry
 int getNumPE()
          Gets the number of PEs associated with this entry
 void setAvailRanges(PERangeList availRanges)
          Sets the ranges of PEs available at this entry
 String toString()
          Creates a string representation of this entry
 
Methods inherited from class ProfileEntry
compareTo, decreaseJob, getNumJobs, getTime, increaseJob, setTime
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SingleProfileEntry

public SingleProfileEntry(double time)
Creates a new instance of SingleProfileEntry

Parameters:
time - the time associated with this entry

SingleProfileEntry

public SingleProfileEntry(double time,
                          PERangeList ranges)
Creates a new instance of SingleProfileEntry

Parameters:
time - the time associated with this entry
ranges - the list of ranges of PEs available
Method Detail

getAvailRanges

public PERangeList getAvailRanges()
Returns the list of ranges available at this entry

Specified by:
getAvailRanges in class ProfileEntry
Returns:
the list of ranges available

setAvailRanges

public void setAvailRanges(PERangeList availRanges)
Sets the ranges of PEs available at this entry

Parameters:
availRanges - the list of ranges of PEs available

addRanges

public boolean addRanges(PERangeList list)
Adds the ranges provided to the list of ranges available

Parameters:
list - the list to be added
Returns:
true if the ranges changed as result of this call

getNumPE

public int getNumPE()
Gets the number of PEs associated with this entry

Specified by:
getNumPE in class ProfileEntry
Returns:
the number of PEs

toString

public String toString()
Creates a string representation of this entry

Overrides:
toString in class Object
Returns:
a representation of this entry

clone

public SingleProfileEntry clone(double time)
Returns a clone of this entry. The ranges are cloned, but the time and the number of requests relying on this entry are not.

Specified by:
clone in class ProfileEntry
Parameters:
time - the time for the new entry
Returns:
the new entry with the number of requests set to default.

GridSim 5.0 beta

The University of Melbourne, Australia, 2009