edu.jhu.cnds.Frugal
Class CPUSpeed

java.lang.Object
  |
  +--net.jini.entry.AbstractEntry
        |
        +--edu.jhu.cnds.Frugal.CPUSpeed

public class CPUSpeed
extends net.jini.entry.AbstractEntry

An entry corresponding to a given Frugal Resource's speed. Speed is measured in abstract units based on the number of computations per second the machine can complete under a given load. It is measured with a one-second long test every thirty seconds.

Version:
2.0
Author:
R. Sean Borgstrom
See Also:
Serialized Form

Field Summary
 java.lang.String cueCard
          String with textual data about the speed of the machine on which this Frugal Resource runs.
 java.lang.Long currSpeed
          The most recently measured speed for the machine on which the Frugal Resource runs.
 java.lang.Double maxLoad
          The highest load this Frugal Resource has ever seen, defined as the highest speed it has ever seen divided by the lowest speed it has ever seen.
 java.lang.Long maxSpeed
          The highest speed this Frugal Resource has ever seen on the machine on which it runs.
 
Constructor Summary
CPUSpeed()
          Creates a blank CPU Speed entry.
CPUSpeed(long current, long max, double maxLoad)
          Creates a CPU Speed entry.
 
Methods inherited from class net.jini.entry.AbstractEntry
equals, equals, hashCode, hashCode, toString, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

currSpeed

public java.lang.Long currSpeed
The most recently measured speed for the machine on which the Frugal Resource runs.

maxSpeed

public java.lang.Long maxSpeed
The highest speed this Frugal Resource has ever seen on the machine on which it runs.

maxLoad

public java.lang.Double maxLoad
The highest load this Frugal Resource has ever seen, defined as the highest speed it has ever seen divided by the lowest speed it has ever seen.

cueCard

public java.lang.String cueCard
String with textual data about the speed of the machine on which this Frugal Resource runs.
Constructor Detail

CPUSpeed

public CPUSpeed()
Creates a blank CPU Speed entry.

CPUSpeed

public CPUSpeed(long current,
                long max,
                double maxLoad)
Creates a CPU Speed entry.
Parameters:
current - long that becomes "currSpeed".
max - long that becomes "maxSpeed".
maxLoad - double that becomes "maxLoad".