edu.cmu.cs.able.gauges.Siena.Demo
Class LatencyGaugeImpl
java.lang.Object
|
+--edu.cmu.cs.able.gaugeInfrastructure.GaugeImpl
|
+--edu.cmu.cs.able.gauges.Siena.Demo.LatencyGaugeImpl
- All Implemented Interfaces:
- edu.cmu.cs.able.probebus.IProbeConsumer, java.lang.Runnable
- public class LatencyGaugeImpl
- extends edu.cmu.cs.able.gaugeInfrastructure.GaugeImpl
- implements edu.cmu.cs.able.probebus.IProbeConsumer
Implementation of the LatencyGauge, conforming to gauge type:
LatencyGauge = [
type = edu.cmu.cs.able.gauges.Siena.Demo.LatencyGauge
setup = [where : String]
config = [reset : boolean]
values = [latency : float]
Fields inherited from class edu.cmu.cs.able.gaugeInfrastructure.GaugeImpl |
doReporting, gaugeBus, gaugeID, gaugeType, mappings, reportingFrequency, reportingThread, setupParams |
Constructor Summary |
LatencyGaugeImpl(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 gaugeBus,
edu.cmu.cs.able.probebus.IProbeBus probeBus)
Creates new SienaLatencyGauge |
Method Summary |
boolean |
configure(edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector configParams)
This method is used to configure the gauge. |
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)
Returns the current latency. |
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
ZERO
public static final java.lang.Double ZERO
latencyProbe
public KXProbeHelper latencyProbe
LatencyGaugeImpl
public LatencyGaugeImpl(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 gaugeBus,
edu.cmu.cs.able.probebus.IProbeBus probeBus)
- Creates new SienaLatencyGauge
- 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 : intmappings
- The property that the latency
value is associated with.
configure
public boolean configure(edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector configParams)
- This method is used to configure the gauge.
- Overrides:
configure
in class edu.cmu.cs.able.gaugeInfrastructure.GaugeImpl
- Parameters:
configParams
- The parameters used to configure the gauge. For the
BandwidthGauge, there are no valid configuration parameters for this gauge.- Returns:
- Whether the gauge was successfully configured. Will always return false.
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)
- Returns the current latency.
- Overrides:
queryAllValues
in class edu.cmu.cs.able.gaugeInfrastructure.GaugeImpl
- Parameters:
values
- The vector into which to place the latency.- Returns:
- Whether the gauge could report it's current value.
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:
event.
- The event that was reported.