|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.cmu.cs.able.gaugeInfrastructure.GaugeImpl
This class provides the root class for all gauge implementations. It should contain the processing and calculation part of the gauge. It is the part of the gauge that is completely independent of the transport mechanism used.
Field Summary | |
protected boolean |
doReporting
Indicates whether to do reporting or not. |
protected GaugeReportingBus |
gaugeBus
The bus through which values are reported. |
protected GaugeID |
gaugeID
The ID of the gauge. |
static java.lang.String |
gaugeType
The type of the gauge being implemented. |
protected java.util.Hashtable |
mappings
The mappings of values to architectural properties. |
protected int |
reportingFrequency
The frequency to report values (in milliseconds). |
protected java.lang.Thread |
reportingThread
The thread that does periodic reporting of values. |
protected StringPairVector |
setupParams
The setup parameters for the gauge instance. |
Constructor Summary | |
GaugeImpl(GaugeID gid,
StringPairVector setupParams,
StringPairVector mappings,
GaugeReportingBus bus)
Creates a new instance of GaugeImpl |
Method Summary | |
abstract boolean |
configure(StringPairVector configParams)
Is used to configure the gauge. |
abstract boolean |
consistentlyCreated()
Used to check if the gauge has been successfully created. |
abstract boolean |
queryAllValues(GaugeValueVector values)
Used to get the current value of all the values that the gauge reports. |
abstract boolean |
queryState(StringPairVector setupParams,
StringPairVector configParams,
StringPairVector mappings)
Used to query the current state of the gauge. |
abstract java.lang.String |
queryValue(java.lang.String valueName)
Queries the value of a particular gauge value. |
abstract void |
reportNewValue()
Implemented by specific gauges to report a new value. |
void |
run()
The method used to start the gauge reporting thread. |
void |
startReportingThread()
Starts the gauge reporting thread. |
void |
stopReportingThread()
Stops the gauge reporting thread. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.lang.String gaugeType
protected GaugeID gaugeID
protected boolean doReporting
protected java.lang.Thread reportingThread
protected int reportingFrequency
protected StringPairVector setupParams
protected java.util.Hashtable mappings
protected GaugeReportingBus gaugeBus
Constructor Detail |
public GaugeImpl(GaugeID gid, StringPairVector setupParams, StringPairVector mappings, GaugeReportingBus bus)
gid
- The gauge ID of the new gauge.setupParams
- The setup parameters used to construct the gauge.mappings
- The mappings of values to architectural properties.bus
- The bus to be used for reporting.Method Detail |
public void run()
run
in interface java.lang.Runnable
public void startReportingThread()
public void stopReportingThread()
public abstract boolean consistentlyCreated()
public abstract void reportNewValue()
public abstract boolean configure(StringPairVector configParams)
configParams
- The configuration parameterspublic abstract boolean queryAllValues(GaugeValueVector values)
values
- This is filled in with triples of value name, property name (what the value is mapped to), and value.public abstract boolean queryState(StringPairVector setupParams, StringPairVector configParams, StringPairVector mappings)
setupParams
- Filled with the parameters that were used to setup the gauge.configParams
- Filled with parameters indicating how the gauge is currently configured.mappings
- Filled with the mappings between values and high-level properties.public abstract java.lang.String queryValue(java.lang.String valueName)
valueName
- The name of the value to be reported.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |