Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jini.rio.core
Interface ResourceCostModel

All Superinterfaces:
  Serializable

All Known Implementing Classes:
  GenericCostModel, ZeroCostModel

    public interface ResourceCostModel

extends Serializable

The ResourceCostModel provides a mechanism to define the cost per unit for a resource

Nested Class Summary
`static class` | `ResourceCostModel.TimeBoundary` Indicates a time boundary and the multiplier to apply to the cost per unit

Method Summary
`void` | `addTimeBoundary(ResourceCostModel.TimeBoundary timeBoundary)` Add a TimeBoundary to the ResourceCostModel
`double` | `getCostPerUnit(long duration)` Get the cost per unit
`String` | `getDescription()` Get the description of the ResourceCostModel

Method Detail

### getCostPerUnit

    double getCostPerUnit(long duration)

  Get the cost per unit

  Parameters:
    `duration` - The amount of time in milliseconds that is to be used to compute the cost per unit
  Returns:
    The cost per unit

### getDescription

    String getDescription()

  Get the description of the ResourceCostModel

  Returns:
    String The description of the ResourceCostModel

### addTimeBoundary

    void addTimeBoundary(ResourceCostModel.TimeBoundary timeBoundary)

  Add a TimeBoundary to the ResourceCostModel

  Parameters:
    `timeBoundary` - A TimeBoundary indicating the attributes to be applied to the computation of cost per unit for resource use over a duration

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Project Rio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Project Rio.