|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.cmu.cs.able.gaugeInfrastructure.Siena.SienaGauge | +--edu.cmu.cs.able.gauges.Siena.SienaBandwidthGauge
This class implements a BandwidthGauge, and uses RemosProbes
to determine the current bandwidth. It is assumed that a RemosProbe
is listening on the siena bus. The gauge type for this gauge is:
BandwidthGauge = [
type = edu.cmu.cs.able.gauges.Siena.SienaBandwidthGauge
setup = [IP_addr1 : String = "localhost"; IP_addr2 = "localhost"; Frequency : long = 100]
config = [Frequency : long = 100]
values = [bandwidth : float]
Field Summary | |
protected java.lang.Double |
currentBW
The bandwidth that was currently measured from the probe. |
protected int |
frequency
How often this gauge should report the bandwidth. |
protected java.lang.String |
gaugeType
The type of the BandwidthGauge (edu.cmu.cs.able.gauges.Siena.SienaBandwidthGauge) |
protected java.net.InetAddress |
ip1
The IP address of one endpoint to determine the bandwidth between. |
protected java.net.InetAddress |
ip2
The IP address of one endpoint to determine the bandwidth between. |
static java.lang.String |
senp
The location of the siena bus server. |
Fields inherited from class edu.cmu.cs.able.gaugeInfrastructure.Siena.SienaGauge |
doReporting, gaugeBus, mappings, myManagerID, setupParams, sleepTime |
Constructor Summary | |
SienaBandwidthGauge(GaugeID gaugeID,
java.lang.String creatorID,
StringPairVector setupParams,
StringPairVector mappings)
Creates new SienaBandwidthGauge |
Method Summary | |
boolean |
configure(StringPairVector configParams)
Configures the gauge. |
static void |
main(java.lang.String[] args)
A command-line interface to start the gauge. |
boolean |
queryAllValues(GaugeValueVector values)
Returns all the values that this gauge reports. |
boolean |
queryState(StringPairVector setupParams,
StringPairVector configParams,
StringPairVector mappings)
Returns the state of this gauge. |
java.lang.String |
queryValue(java.lang.String valueName)
Returns the value of a particular value name |
void |
reportNewValue()
Reports a new value. |
void |
sensed(double bw)
The callback that implements BandwidthProbeConsumer. |
Methods inherited from class edu.cmu.cs.able.gaugeInfrastructure.Siena.SienaGauge |
finalizeCreation, finalizeDeletion, getGaugeID, processDelete, run, setGaugeID, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String gaugeType
protected java.net.InetAddress ip1
protected java.net.InetAddress ip2
protected int frequency
protected java.lang.Double currentBW
public static java.lang.String senp
Constructor Detail |
public SienaBandwidthGauge(GaugeID gaugeID, java.lang.String creatorID, StringPairVector setupParams, StringPairVector mappings)
gaugeID
- The ID of the gauge to create.creatorID
- The ID of the gauge manager that is creating the gauge.setupParams
- The value of the setup params, with items for IP_addr1, IP_addr2, and Frequency.mappings
- The definition of the mapping between the bandwidth value and a model.Method Detail |
public boolean configure(StringPairVector configParams)
configure
in class SienaGauge
configParams
- The configuration parameters for this gauge.public boolean queryAllValues(GaugeValueVector values)
queryAllValues
in class SienaGauge
values
- Filled with an entry for bandwidth, with the value of the currentBW.public boolean queryState(StringPairVector setupParams, StringPairVector configParams, StringPairVector mappings)
queryState
in class SienaGauge
setupParams
- The parameters that the gauge was setup with.configParams
- The current configuration of the gauge.mappings
- The current mappings of the gauge.public java.lang.String queryValue(java.lang.String valueName)
queryValue
in class SienaGauge
valueName
- The name of the value to return.public void reportNewValue()
reportNewValue
in class SienaGauge
public void sensed(double bw)
sensed
in interface BandwidthProbeConsumer
bw
- The bandwidth reported by the RemosProbe.public static void main(java.lang.String[] args)
args
- -gt gauge type
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |