Class ExampleTakePassiveResourceStateProbe
java.lang.Object
org.palladiosimulator.probeframework.probes.Probe
org.palladiosimulator.probeframework.probes.TriggeredProbe
org.palladiosimulator.probeframework.probes.BasicTriggeredProbe<V,Q>
org.palladiosimulator.probeframework.probes.BasicObjectStateProbe<ASimplePassiveResource,Long,javax.measure.quantity.Dimensionless>
org.palladiosimulator.probeframework.probes.example.ExampleTakePassiveResourceStateProbe
- All Implemented Interfaces:
org.palladiosimulator.commons.designpatterns.IAbstractObservable<IProbeListener>
,org.palladiosimulator.metricspec.metricentity.IMetricEntity
public class ExampleTakePassiveResourceStateProbe
extends BasicObjectStateProbe<ASimplePassiveResource,Long,javax.measure.quantity.Dimensionless>
Measures a passive resource state metric (dimensionless) by taking the number of free
resources within a passive resource (observed state object), e.g., a connection pool. This class
uses
ASimplePassiveResource
as an example passive resource.-
Field Summary
Fields inherited from class org.palladiosimulator.probeframework.probes.Probe
metricEntityDelegate
-
Constructor Summary
ConstructorDescriptionExampleTakePassiveResourceStateProbe
(ASimplePassiveResource passiveResource) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected javax.measure.Measure<Long,
javax.measure.quantity.Dimensionless> getBasicMeasure
(RequestContext measurementContext) Measures the free resources as requested from the passive resource (observed state object).Methods inherited from class org.palladiosimulator.probeframework.probes.BasicObjectStateProbe
getStateObject
Methods inherited from class org.palladiosimulator.probeframework.probes.BasicTriggeredProbe
doMeasure
Methods inherited from class org.palladiosimulator.probeframework.probes.TriggeredProbe
takeMeasurement, takeMeasurement
Methods inherited from class org.palladiosimulator.probeframework.probes.Probe
addObserver, getMetricDesciption, isCompatibleWith, notifyMeasurementSourceListener, removeObserver
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.palladiosimulator.metricspec.metricentity.IMetricEntity
getMetricDesciption, isCompatibleWith
-
Constructor Details
-
ExampleTakePassiveResourceStateProbe
Default constructor.- Parameters:
passiveResource
- The observer object is a passive resource, thus, allowing to request its free resources.
-
-
Method Details
-
getBasicMeasure
protected javax.measure.Measure<Long,javax.measure.quantity.Dimensionless> getBasicMeasure(RequestContext measurementContext) Measures the free resources as requested from the passive resource (observed state object).- Specified by:
getBasicMeasure
in classBasicTriggeredProbe<Long,
javax.measure.quantity.Dimensionless> - Parameters:
measurementContext
- The measurement context for this probe.- Returns:
- The new measure.
-