Class RegisterCalculatorFactoryDecorator

    • Constructor Detail

      • RegisterCalculatorFactoryDecorator

        public RegisterCalculatorFactoryDecorator​(IGenericCalculatorFactory decoratedFactory)
        Default constructor. Decorates given factory by a register.
        Parameters:
        decoratedFactory - The calculator factory to be decorated.
    • Method Detail

      • getCalculatorByMeasuringPointAndMetricDescription

        public Calculator getCalculatorByMeasuringPointAndMetricDescription​(org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint mp,
                                                                            org.palladiosimulator.metricspec.MetricDescription metric)
        Convenience method to get the calculator that is associated with the given measuring point and metric.

        Important note: If a base metric such as 'Response Time' is passed here, and an 'Response Time Tuple' calculator is available at the given measuring point it is NOT found by the current implementation of this method, since these are different metric (base metric vs. metric set)!.
        In such a case, better use ICalculatorRegistryAccess.getCalculatorsForMeasuringPoint(MeasuringPoint) and filter the resulting collection manually for the desired base metric.
        Specified by:
        getCalculatorByMeasuringPointAndMetricDescription in interface ICalculatorRegistryAccess
        Parameters:
        mp - A MeasuringPoint instance which is associated with a calculator.
        metric - A MetricDescription denoting the metric the calculator is accepting.
        Returns:
        A Calculator instance associated with the given measuring point and metric, or null if no matching Calculator is found.
        See Also:
        ICalculatorRegistryAccess.getCalculatorsForMeasuringPoint(MeasuringPoint)
      • finish

        public void finish()
        Cleans up all registered calculators informing each calculator about being unregistered and subsequently cleaning the register.
      • buildCalculator

        public Calculator buildCalculator​(org.palladiosimulator.metricspec.MetricDescription metric,
                                          org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint,
                                          CalculatorProbeSet probeConfiguration)
        Creates a new Calculator for the given MetricDescription
        Specified by:
        buildCalculator in interface IGenericCalculatorFactory
        Parameters:
        metric - the metric which is calculated based on the probe measurements.
        measuringPoint - the measuring point where this calculator is used
        probeConfiguration - the configuration of probes required by the calculator of the metric.
        Returns:
        the desired calculator