edu.cmu.cs.able.gauges.Siena.Demo
Class ServerLoadGaugeImpl
java.lang.Object
|
+--edu.cmu.cs.able.gaugeInfrastructure.GaugeImpl
|
+--edu.cmu.cs.able.gauges.Siena.Demo.ServerLoadGaugeImpl
- All Implemented Interfaces:
- edu.cmu.cs.able.probebus.IProbeConsumer, java.lang.Runnable
- public class ServerLoadGaugeImpl
- extends edu.cmu.cs.able.gaugeInfrastructure.GaugeImpl
- implements edu.cmu.cs.able.probebus.IProbeConsumer
Implementation of the ServerLoadGauge, conforming to gauge type:
ServerLoadGauge = [
type = edu.cmu.cs.able.gauges.Siena.Demo.ServerLoadGauge
setup = [where : String]
config = []
values = [load : int]
Fields inherited from class edu.cmu.cs.able.gaugeInfrastructure.GaugeImpl |
doReporting, gaugeBus, gaugeID, mappings, reportingFrequency, reportingThread, setupParams |
Constructor Summary |
ServerLoadGaugeImpl(edu.cmu.cs.able.gaugeInfrastructure.util.GaugeID gid,
edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector setup,
edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector mappings,
edu.cmu.cs.able.gaugeInfrastructure.GaugeReportingBus gBus,
edu.cmu.cs.able.probebus.IProbeBus pBus)
Creates new ServerLoadGauge |
Method Summary |
boolean |
configure(edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector configParams)
|
boolean |
consistentlyCreated()
|
void |
onProbeEvent(edu.cmu.cs.able.probebus.IProbeEvent event)
The callback invoked when a probe reports a single event. |
boolean |
queryAllValues(edu.cmu.cs.able.gaugeInfrastructure.util.GaugeValueVector values)
|
boolean |
queryState(edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector setupParams,
edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector configParams,
edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector mappings)
|
java.lang.String |
queryValue(java.lang.String valueName)
|
void |
reportNewValue()
|
Methods inherited from class edu.cmu.cs.able.gaugeInfrastructure.GaugeImpl |
run, startReportingThread, stopReportingThread |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
where
protected java.lang.String where
- Where (the component or connector) the gauge is attached. (maps to the probe shell name)
queue
protected java.lang.String queue
gaugeType
public java.lang.String gaugeType
loadProbe
public KXProbeHelper loadProbe
ServerLoadGaugeImpl
public ServerLoadGaugeImpl(edu.cmu.cs.able.gaugeInfrastructure.util.GaugeID gid,
edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector setup,
edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector mappings,
edu.cmu.cs.able.gaugeInfrastructure.GaugeReportingBus gBus,
edu.cmu.cs.able.probebus.IProbeBus pBus)
- Creates new ServerLoadGauge
- Parameters:
gaugeID
- The ID of the new gauge.creatorID
- The ID of the gauge manager that created the gauge.setupParams
- The parameters that the gauge uses to set itself up. The
valid setup parameters for this gauge are:
where : Stringmappings
- The property that the latency
value is associated with.
configure
public boolean configure(edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector configParams)
- Overrides:
configure
in class edu.cmu.cs.able.gaugeInfrastructure.GaugeImpl
consistentlyCreated
public boolean consistentlyCreated()
- Overrides:
consistentlyCreated
in class edu.cmu.cs.able.gaugeInfrastructure.GaugeImpl
queryAllValues
public boolean queryAllValues(edu.cmu.cs.able.gaugeInfrastructure.util.GaugeValueVector values)
- Overrides:
queryAllValues
in class edu.cmu.cs.able.gaugeInfrastructure.GaugeImpl
queryState
public boolean queryState(edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector setupParams,
edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector configParams,
edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector mappings)
- Overrides:
queryState
in class edu.cmu.cs.able.gaugeInfrastructure.GaugeImpl
queryValue
public java.lang.String queryValue(java.lang.String valueName)
- Overrides:
queryValue
in class edu.cmu.cs.able.gaugeInfrastructure.GaugeImpl
reportNewValue
public void reportNewValue()
- Overrides:
reportNewValue
in class edu.cmu.cs.able.gaugeInfrastructure.GaugeImpl
onProbeEvent
public void onProbeEvent(edu.cmu.cs.able.probebus.IProbeEvent event)
- The callback invoked when a probe reports a single event.
- Specified by:
onProbeEvent
in interface edu.cmu.cs.able.probebus.IProbeConsumer
- Parameters:
e.
- The event that was reported.