Class ExtensibleCalculatorFactoryDelegatingFactory
java.lang.Object
org.palladiosimulator.probeframework.calculator.ExtensibleCalculatorFactoryDelegatingFactory
- All Implemented Interfaces:
IGenericCalculatorFactory
public class ExtensibleCalculatorFactoryDelegatingFactory
extends Object
implements IGenericCalculatorFactory
This factory allows to use specialized factories for Calculators of dedicated
metrics. Calculator factories can be registered based on the id of the
metric. In case no dedicated factory is registered, a fallback factory can be
provided.
By default the factory uses the
CalculatorFactoryRegistryExtensionPoint
to look up specialized
factories and uses ProbeConfigurationBasedCalculatorFactory
as
fallback. Therefore, without providing additional registrations, the factory
provides support for either probe measurements which are passed through
directly, and time span measurements.-
Constructor Summary
ConstructorDescriptionCreates a new instance using the eclipse extension point (if available) and a calculator probe set based heuristic for identity and time span calculators.ExtensibleCalculatorFactoryDelegatingFactory
(Map<String, IGenericCalculatorFactory> delegateFactories, IGenericCalculatorFactory fallbackFactory) Creates a new instance with the provided specializations and the fallback factory. -
Method Summary
Modifier and TypeMethodDescriptionbuildCalculator
(org.palladiosimulator.metricspec.MetricDescription metric, org.palladiosimulator.edp2.models.measuringpoint.MeasuringPoint measuringPoint, CalculatorProbeSet probeConfiguration) { Creates a new Calculator for the given MetricDescription
-
Constructor Details
-
ExtensibleCalculatorFactoryDelegatingFactory
public ExtensibleCalculatorFactoryDelegatingFactory()Creates a new instance using the eclipse extension point (if available) and a calculator probe set based heuristic for identity and time span calculators. -
ExtensibleCalculatorFactoryDelegatingFactory
public ExtensibleCalculatorFactoryDelegatingFactory(Map<String, IGenericCalculatorFactory> delegateFactories, IGenericCalculatorFactory fallbackFactory) Creates a new instance with the provided specializations and the fallback factory.- Parameters:
delegateFactories
- a map of metric id to specialized factory.fallbackFactory
- the factory which is called if there is no specialized factory.
-
-
Method Details
-
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 interfaceIGenericCalculatorFactory
- Parameters:
metric
- the metric which is calculated based on the probe measurements.measuringPoint
- the measuring point where this calculator is usedprobeConfiguration
- the configuration of probes required by the calculator of the metric.- Returns:
- the desired calculator
-