Class ExtendedMeasureProvider
- java.lang.Object
-
- de.fzi.power.interpreter.measureprovider.ExtendedMeasureProvider
-
- All Implemented Interfaces:
IAdaptable
,org.palladiosimulator.edp2.datastream.configurable.IPropertyConfigurable
- Direct Known Subclasses:
AbstractFilterMeasureProvider
public abstract class ExtendedMeasureProvider extends Object implements org.palladiosimulator.edp2.datastream.configurable.IPropertyConfigurable
ExtendedMeasureProviders allow to extend theEvaluationScope
with the capability to automatically create additional metrics potentially from other existing metrics.
-
-
Constructor Summary
Constructors Constructor Description ExtendedMeasureProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
canProvideMetric(org.palladiosimulator.metricspec.MetricDescription desiredMetric, Collection<org.palladiosimulator.metricspec.MetricDescription> availableSourceMetrics)
Given the set ofavailableDataSources
the method returns true, iff the provider is able to provide the desired metric.abstract org.palladiosimulator.edp2.datastream.IDataSource
getDataSource(Set<org.palladiosimulator.edp2.datastream.IDataSource> availableDataSources)
Gets aIDataSource
which contains the new metrics.protected abstract Collection<Set<String>>
getSourceMetricIds()
abstract Collection<Set<org.palladiosimulator.metricspec.MetricDescription>>
getSourceMetrics()
Gets a collection of the sets of metrics the measure provider requires to be able to provide the additional target metrics.abstract Set<org.palladiosimulator.metricspec.MetricDescription>
getTargetMetrics()
Gets the set of metrics the measure provider has to offer in case all of the source metrics requirements are satisfied.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
-
-
-
-
Method Detail
-
getSourceMetrics
public abstract Collection<Set<org.palladiosimulator.metricspec.MetricDescription>> getSourceMetrics()
Gets a collection of the sets of metrics the measure provider requires to be able to provide the additional target metrics. Since it is conceivable that a provider is capable to deal with different source metrics (or metric combinations) combinations to provide its results this method returns a collection of sets.
For instance, if a provider requires two metrics at the same time to provide its results, a collection with a set of these two should be returned. In contrast, if the provider needs only either of the two, a collection of two singleton sets should be returned here. In case, no input metrics are required, the resulting collection should contain empty or contain a single, empty set.- Returns:
- A
Collection
of the sets of required source metrics.
-
getSourceMetricIds
protected abstract Collection<Set<String>> getSourceMetricIds()
-
getTargetMetrics
public abstract Set<org.palladiosimulator.metricspec.MetricDescription> getTargetMetrics()
Gets the set of metrics the measure provider has to offer in case all of the source metrics requirements are satisfied.- Returns:
- the set of target metrics
-
getDataSource
public abstract org.palladiosimulator.edp2.datastream.IDataSource getDataSource(Set<org.palladiosimulator.edp2.datastream.IDataSource> availableDataSources)
Gets aIDataSource
which contains the new metrics.- Parameters:
availableDataSources
- the available data sources- Returns:
- the respective IDataSource
-
canProvideMetric
public boolean canProvideMetric(org.palladiosimulator.metricspec.MetricDescription desiredMetric, Collection<org.palladiosimulator.metricspec.MetricDescription> availableSourceMetrics)
Given the set ofavailableDataSources
the method returns true, iff the provider is able to provide the desired metric.- Parameters:
desiredMetric
- the desired metricavailableSourceMetrics
- the available data sources- Returns:
- true, if metric is available
- Throws:
NullPointerException
- In case either argument isnull
.
-
-