GridSim 5.0 beta

gridsim.parallel.profile
Class TimeSlot

Object
  extended by TimeSlot

public class TimeSlot
extends Object

This class defines a time slot. A time slot can be used to represent a free fragment in the scheduling queue. This may be useful for users who want to implement policies that perform best-fit, next-fit or worst-fit time slot selection. For a description on how time slots can be utilised, please read the following paper about the MAUI scheduler:

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

Constructor Summary
TimeSlot(double startTime, double finishTime, PERangeList ranges)
          Default constructor sets
 
Method Summary
 double getDuration()
          Returns the time duration of this time slot.
 double getFinishTime()
          Returns the finish time of this time slot
 int getNumPE()
          Returns the number of PEs available at the time slot
 PERangeList getPERanges()
          Returns the PE ranges available at the time slot
 double getStartTime()
          Returns the start time of this time slot
 boolean setFinishTime(double finishTime)
          Sets the finish time of the time slot
 boolean setPERanges(PERangeList ranges)
          Sets the ranges of the time slot
 boolean setStartTime(double startTime)
          Sets the start time of the time slot
 String toString()
          Creates a string representation of the list
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimeSlot

public TimeSlot(double startTime,
                double finishTime,
                PERangeList ranges)
Default constructor sets

Parameters:
startTime - the start time of the time slot
finishTime - the finish time of the time slot
ranges - the list of PE ranges available at the slot
Method Detail

setStartTime

public boolean setStartTime(double startTime)
Sets the start time of the time slot

Parameters:
startTime - the start time
Returns:
true if set successfully; false otherwise.
Pre Condition:
startTime >= 0

setFinishTime

public boolean setFinishTime(double finishTime)
Sets the finish time of the time slot

Parameters:
finishTime - the finish time
Returns:
true if set successfully; false otherwise.
Pre Condition:
finishTime >= 0

setPERanges

public boolean setPERanges(PERangeList ranges)
Sets the ranges of the time slot

Parameters:
ranges - the ranges of this time slot
Returns:
true if set successfully; false otherwise.
Pre Condition:
ranges != null

getStartTime

public double getStartTime()
Returns the start time of this time slot

Returns:
the start time of this time slot

getFinishTime

public double getFinishTime()
Returns the finish time of this time slot

Returns:
the finish time of this time slot

getDuration

public double getDuration()
Returns the time duration of this time slot.

Returns:
the time duration of this time slot.

getPERanges

public PERangeList getPERanges()
Returns the PE ranges available at the time slot

Returns:
the PE ranges available at the time slot

getNumPE

public int getNumPE()
Returns the number of PEs available at the time slot

Returns:
the number of PEs available at the time slot

toString

public String toString()
Creates a string representation of the list

Overrides:
toString in class Object
Returns:
a string representation

GridSim 5.0 beta

The University of Melbourne, Australia, 2009