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.qos.capability.system
Class ByteOrientedDevice

    java.lang.Object
      org.jini.rio.qos.capability.PlatformCapability
          org.jini.rio.qos.capability.system.ByteOrientedDevice

All Implemented Interfaces:
  Serializable, ResourceCostProducer, PlatformCapabilityMBean

Direct Known Subclasses:
  Memory, StorageCapability

    public class ByteOrientedDevice

extends PlatformCapability

Represents a capability that has a capacity thats measured in bytes

See Also:
  Serialized Form

Field Summary
`static String` | `AVAILABLE` Available resource units (in bytes)
`static String` | `CAPACITY` Resource capacity (in bytes)
`static double` | `GB` Gigabytes
`static double` | `KB` Kilobytes
`static double` | `MB` Megabytes
`static double` | `TB` Terabytes

Fields inherited from class org.jini.rio.qos.capability.PlatformCapability
`capabilities, description, DESCRIPTION, downloadRecords, logger, MANUFACTURER, MODEL, NAME, NATIVE_LIBS, path, PROVISIONABLE, softwareLoad, STATIC, VENDOR, VERSION`

Constructor Summary
`ByteOrientedDevice()`

Method Summary
`void` | `define(String key, Object value)` Override parents define method to create values for capacity and available
`protected boolean` | `evaluate(String input, double val)` Evaluate the input against a measures amount.
`boolean` | `supports(ServiceLevelAgreements.SystemRequirement requirement)` Override supports to ensure that requirements are supported

Methods inherited from class org.jini.rio.qos.capability.PlatformCapability
`addSoftwareDownloadRecord, calculateResourceCost, clearAll, defineAll, equals, getCapabilities, getClassPath, getDescription, getName, getPath, getPlatformKeys, getSoftwareDownloadRecords, getSoftwareLoad, getType, getValue, hasBasicSupport, hashCode, loadResources, matches, remove, setClassPath, setDescription, setPath, setResourceCostModel, setSoftwareLoad, setType, supports, toString, versionSupported`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### AVAILABLE

    public static final String AVAILABLE

  Available resource units (in bytes)

  See Also:
    Constant Field Values

### CAPACITY

    public static final String CAPACITY

  Resource capacity (in bytes)

  See Also:
    Constant Field Values

### KB

    public static final double KB

  Kilobytes

  See Also:
    Constant Field Values

### MB

    public static final double MB

  Megabytes

### GB

    public static final double GB

  Gigabytes

### TB

    public static final double TB

  Terabytes

Constructor Detail

### ByteOrientedDevice

    public ByteOrientedDevice()

Method Detail

### define

    public void define(String key,
                       Object value)

  Override parents define method to create values for capacity and available

  Overrides:
    `define` in class `PlatformCapability`
  Parameters:
    `key` - The key associated with the platform capability. Can be a name or another descriptive attribute used to uniquely identify the platform capability
    `value` - The value associated with the platform capability key

### supports

    public boolean supports(ServiceLevelAgreements.SystemRequirement requirement)

  Override supports to ensure that requirements are supported

  Overrides:
    `supports` in class `PlatformCapability`
  Parameters:
    `requirement` - The requirement to test
  Returns:
    True if they are, false if not
  See Also:
    `PlatformCapability.supports(org.jini.rio.qos.capability.PlatformCapability)`

### evaluate

    protected boolean evaluate(String input,
                               double val)

  Evaluate the input against a measures amount. Based on the

  Parameters:
    `input` - The value of either the CAPACITY or the AVAILABLE key. Must end in 'm' or 'M' for megabytes, 'k' or 'K' for kilobytes, 'g' or 'G' for gigabytes, and 't' or 'T' for terabytes
    `val` - The measured value, either the total or the available property
  Returns:
    True if the amount requested can be supported, or false if not

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.