GridSim 5.0 beta

gridsim.resFailure
Class FailureMsg

Object
  extended by FailureMsg

public class FailureMsg
extends Object

This class is used by RegionalGISWithFailure to commnunicate with GridResourceWithFailure for simulating a resource failure.

Since:
GridSim Toolkit 4.1
Author:
Agustin Caminero

Constructor Summary
FailureMsg(double time, int rid)
          Creates a new failure message
 
Method Summary
 double getNumMachines()
          This method returns the number of machines which will fail in this resource
 int getRes()
          This method returns the res_id attribute of the ResourceFailure object
 double getTime()
          This method returns the time attribute of the ResourceFailure object
 void setNumMachines(int n)
          This method sets the numMachines attribute of the ResourceFailure object
 void setRes(int r)
          This method sets the res_id attribute of the ResourceFailure object
 void setTime(double time)
          This method sets the time attribute of the ResourceFailure object
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FailureMsg

public FailureMsg(double time,
                  int rid)
Creates a new failure message

Parameters:
time - the time that the failure will last
rid - the resource id
Method Detail

setTime

public void setTime(double time)
This method sets the time attribute of the ResourceFailure object

Parameters:
time - the time that the failure will last

getTime

public double getTime()
This method returns the time attribute of the ResourceFailure object

Returns:
time

setRes

public void setRes(int r)
This method sets the res_id attribute of the ResourceFailure object

Parameters:
r - the resource id of the resource

getRes

public int getRes()
This method returns the res_id attribute of the ResourceFailure object

Returns:
the resource id

setNumMachines

public void setNumMachines(int n)
This method sets the numMachines attribute of the ResourceFailure object

Parameters:
n - the number of machines which will fail in this resource

getNumMachines

public double getNumMachines()
This method returns the number of machines which will fail in this resource

Returns:
number of failed machines

GridSim 5.0 beta

The University of Melbourne, Australia, 2009