GridSim 5.0 beta

gridsim.parallel.profile
Class ProfileEntry

Object
  extended by ProfileEntry
All Implemented Interfaces:
Comparable<ProfileEntry>
Direct Known Subclasses:
PartProfileEntry, Profile.Entry, SingleProfileEntry

public abstract class ProfileEntry
extends Object
implements Comparable<ProfileEntry>

The ProfileEntry 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

Constructor Summary
protected ProfileEntry(double time)
          Creates a new instance of ProfileEntry
 
Method Summary
abstract  ProfileEntry clone(double newTime)
          Returns a clone of this entry.
 int compareTo(ProfileEntry entry)
          Compares this object with the specified object for order.
 int decreaseJob()
          Decreases the number of jobs/reservations that rely on this entry to mark their expected completion time or their anchor point
abstract  PERangeList getAvailRanges()
          Returns the list of ranges available at this entry
 int getNumJobs()
          Returns the number of jobs/reservations that rely on this entry to mark their expected completion time or their anchor point
abstract  int getNumPE()
          Gets the number of PEs associated with this entry
 double getTime()
          Gets the time associated with this entry
 int increaseJob()
          Increases the number of jobs/reservations that rely on this entry to mark their expected completion time or their anchor point
 boolean setTime(double time)
          Sets the time associated with this entry
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProfileEntry

protected ProfileEntry(double time)
Creates a new instance of ProfileEntry

Parameters:
time - the time associated with this entry
Method Detail

getNumPE

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

Returns:
the number of PEs

getAvailRanges

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

Returns:
the list of ranges available

clone

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

Parameters:
newTime - the time for the new entry
Returns:
the new entry with the number of requests set to default.

getTime

public double getTime()
Gets the time associated with this entry

Returns:
the time associated with this entry

setTime

public boolean setTime(double time)
Sets the time associated with this entry

Parameters:
time - the time associated with this entry
Returns:
true if the time has been set successfully or false otherwise.

increaseJob

public int increaseJob()
Increases the number of jobs/reservations that rely on this entry to mark their expected completion time or their anchor point

Returns:
the number of jobs/reservations currently relying on this entry

decreaseJob

public int decreaseJob()
Decreases the number of jobs/reservations that rely on this entry to mark their expected completion time or their anchor point

Returns:
the number of jobs/reservations currently relying on this entry

getNumJobs

public int getNumJobs()
Returns the number of jobs/reservations that rely on this entry to mark their expected completion time or their anchor point

Returns:
the number of jobs/reservations that use this entry

compareTo

public int compareTo(ProfileEntry entry)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Specified by:
compareTo in interface Comparable<ProfileEntry>
Parameters:
entry - the entry to be compared.
Returns:
a negative integer, zero, or a positive integer as this entry is less than, equal to, or greater than the specified entry.

GridSim 5.0 beta

The University of Melbourne, Australia, 2009