gridbroker
Class ResDef

Object
  extended bygridbroker.ResDef

public class ResDef
extends Object

A class that handles resource parameters

Version:
2.1, June 2003
Author:
Manzur Murshed and Rajkumar Buyya
Invariant:
$none

Constructor Summary
ResDef(String arch, String os, int numPE, int PE_SPEC_Rating, int allocationPolicy, double costPerSec)
          Allocates a new ResDef object
 
Method Summary
 int getAllocationPolicy()
          Gets the resource allocation policy
 String getArchitecture()
          Gets the resource architecture name
 double getCostPerSec()
          Gets the resource cost per sec
 int getNumPE()
          Gets the number of PEs (Processing Elements) a resource has
 String getOS()
          Gets the resource operating system
 int getRating()
          Gets the rating of resource's PEs
 void setAllocationPolicy(int policy)
          Sets the resource allocation policy
 void setArchitecture(String name)
          Sets the resource architecture name
 void setCostPerSec(double cost)
          Sets the resource cost per sec
 void setNumPE(int num)
          Sets the number of PEs (Processing Elements)
 void setOS(String os)
          Sets the resource operating system name
 void setRating(int rating)
          Sets the rating for resource's PEs
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResDef

public ResDef(String arch,
              String os,
              int numPE,
              int PE_SPEC_Rating,
              int allocationPolicy,
              double costPerSec)
Allocates a new ResDef object

Parameters:
arch - the architecture name
os - the Operating System name
numPE - the number of PEs (Processing Elements)
PE_SPEC_Rating - the rating of those PEs
allocationPolicy - the allocatio policy of a resource
costPerSec - the cost of a PE per second
Pre Condition:
arch != null, os != null, numPE >= 0, PE_SPEC_Rating >= 0, allocationPolicy >= 0, costPerSec >= 0.0
Post Condition:
$none
Method Detail

getArchitecture

public String getArchitecture()
Gets the resource architecture name

Returns:
architecture name
Pre Condition:
$none
Post Condition:
$result != null

getOS

public String getOS()
Gets the resource operating system

Returns:
operating system name
Pre Condition:
$none
Post Condition:
$result != null

getNumPE

public int getNumPE()
Gets the number of PEs (Processing Elements) a resource has

Returns:
number of PEs
Pre Condition:
$none
Post Condition:
$result >= 0

getRating

public int getRating()
Gets the rating of resource's PEs

Returns:
PEs' rating
Pre Condition:
$none
Post Condition:
$result >= 0

getAllocationPolicy

public int getAllocationPolicy()
Gets the resource allocation policy

Returns:
allocation policy
Pre Condition:
$none
Post Condition:
$result >= 0

getCostPerSec

public double getCostPerSec()
Gets the resource cost per sec

Returns:
cost per sec
Pre Condition:
$none
Post Condition:
$result >= 0.0

setArchitecture

public void setArchitecture(String name)
Sets the resource architecture name

Parameters:
name - resource architecture name
Pre Condition:
name != null
Post Condition:
$none

setOS

public void setOS(String os)
Sets the resource operating system name

Parameters:
os - operating system
Pre Condition:
os != null
Post Condition:
$none

setNumPE

public void setNumPE(int num)
Sets the number of PEs (Processing Elements)

Parameters:
num - number of PEs
Pre Condition:
num >= 0
Post Condition:
$none

setRating

public void setRating(int rating)
Sets the rating for resource's PEs

Parameters:
rating - PEs' rating
Pre Condition:
rating >= 0
Post Condition:
$none

setAllocationPolicy

public void setAllocationPolicy(int policy)
Sets the resource allocation policy

Parameters:
policy - allocation policy
See Also:
ResourceCharacteristics
Pre Condition:
policy >= 0
Post Condition:
$none

setCostPerSec

public void setCostPerSec(double cost)
Sets the resource cost per sec

Parameters:
cost - resource cost
Pre Condition:
cost >= 0.0
Post Condition:
$none