Class DeferredMeasurementInitialization
java.lang.Object
org.palladiosimulator.simulizar.interpreter.listener.DeferredMeasurementInitialization
This facade allows to defer registrations for measurements which are
initialized lazily during simulation.
Currently it depends on the existence of a
RegisterCalculatorFactoryDecorator
to which a listener for new
calculators is attached.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionforCalculatorFactoryDecorator
(org.palladiosimulator.probeframework.calculator.IObservableCalculatorRegistry registryAccess) Returns the facade to be used to defer recorder registrations.abstract void
onMetricDescriptionAndMeasuringPoint
(org.palladiosimulator.metricspec.MetricDescription desc, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint mp, Supplier<org.palladiosimulator.measurementframework.listener.IMeasurementSourceListener> supplier) Registers a provider of anIMeasurementSourceListener
.
-
Constructor Details
-
DeferredMeasurementInitialization
public DeferredMeasurementInitialization()
-
-
Method Details
-
forCalculatorFactoryDecorator
public static DeferredMeasurementInitialization forCalculatorFactoryDecorator(org.palladiosimulator.probeframework.calculator.IObservableCalculatorRegistry registryAccess) Returns the facade to be used to defer recorder registrations. This operation ensures, that there is only one registration facade perRegisterCalculatorFactoryDecorator
.- Parameters:
the
- decorated calculator factory.- Returns:
- the appropriate registration facade.
-
onMetricDescriptionAndMeasuringPoint
public abstract void onMetricDescriptionAndMeasuringPoint(org.palladiosimulator.metricspec.MetricDescription desc, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint mp, Supplier<org.palladiosimulator.measurementframework.listener.IMeasurementSourceListener> supplier) Registers a provider of anIMeasurementSourceListener
. The listener is requested once a calculator which fits todesc
andmp
is registered. If the calculator is already registered, the provider is requested directly. Ifdesc
is of typeBaseMetricDescription
, the provided listener will also be registered if a calculator provides measurements which contain theBaseMetricDescription
.- Parameters:
desc
- The metric description of the measurements produced by the required calculator.mp
- The measuring point of the measurements produced by the required calculatorsupplier
- A provider of the listener, e. g. a chained recorder.
-