Rio Project 4.2 API Documentation
org.rioproject.costmodel
Class ResourceCost
java.lang.Object
org.rioproject.costmodel.ResourceCost
- All Implemented Interfaces:
- Serializable
public class ResourceCost
- extends Object
- implements Serializable
The ResourceCost provides context on the cost of a system resource. Items
related to a resource's cost include an actual (monetary) cost
value, the number of units, the name of the resource which provided the cost,
and a description of the ResourceCostModel which
calculated the cost
- Author:
- Dennis Reedy
- See Also:
- Serialized Form
|
Constructor Summary |
ResourceCost(String resourceName,
double cost,
double units,
String costModelDescription,
Date date)
Create a ResourceCost |
ResourceCost
public ResourceCost(String resourceName,
double cost,
double units,
String costModelDescription,
Date date)
- Create a ResourceCost
- Parameters:
resourceName - The name of the resourcecost - The computed costunits - The amount of units being chargedcostModelDescription - A description of the
ResourceCostModel used to compute the costdate - The date the cost had been computed
getCost
public double getCost()
- Returns:
- The computed cost
getUnits
public double getUnits()
- Get the number of units used. If the resource is a system resource
(a depletion oriented resource), the number of units used corresponds to
the utilization of the resource at the time the ResourceCost
was created.
- Returns:
- The number of units used
getResourceName
public String getResourceName()
- Returns:
- The name of the resource which had the cost computed for it
getDate
public Date getDate()
- Returns:
- The Date the cost was computed
getCostModelDescription
public String getCostModelDescription()
- Returns:
- The description of the
ResourceCostModel
that computed the cost
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2006-2011 Rio Project. All Rights Reserved.