Class AbstractFilterMeasureProvider

  • All Implemented Interfaces:
    IAdaptable, org.palladiosimulator.edp2.datastream.configurable.IPropertyConfigurable
    Direct Known Subclasses:
    UtilizationFilterMeasureProvider

    public abstract class AbstractFilterMeasureProvider
    extends ExtendedMeasureProvider
    Subclass that encapsulates an AbstractFilter as measure provider. Therefore it only supports the combination of a single input and a single output metric.
    Yet, it is possible that more than one metric can be used as input. The measure provider relays property configuration to the encapsulated adapter.
    • Constructor Detail

      • AbstractFilterMeasureProvider

        public AbstractFilterMeasureProvider​(org.palladiosimulator.edp2.datastream.filter.AbstractAdapter adapter)
    • Method Detail

      • getTargetMetric

        protected abstract org.palladiosimulator.metricspec.MetricDescription getTargetMetric()
        To be implemented by subclasses in order to specify the supported output metric.
        Returns:
        A MetricDescription denoting the output metric.
      • getAllowedSourceMetrics

        protected abstract Map<String,​org.palladiosimulator.metricspec.MetricDescription> getAllowedSourceMetrics()
        To be implemented by the subclasses: Each element specifies an allowed input metric.
        Returns:
        A collection of the different supported input metrics, mapped by their corresponding ids.
        For each contained metric it should hold that:
        adapter.canAccept(dataSource) == true <=> this.getSourceMetrics().contains(dataSource.getMetricDescription()) , where adapter is the AbstractFilter associated with this instance.
      • getSourceMetrics

        public final Collection<Set<org.palladiosimulator.metricspec.MetricDescription>> getSourceMetrics()
        Gets the different metrics that can be used as input metrics.
        Specified by:
        getSourceMetrics in class ExtendedMeasureProvider
        Returns:
        A Collection of singleton sets of MetricDescriptions, each of which containing an allowed input metric.
      • getTargetMetrics

        public final Set<org.palladiosimulator.metricspec.MetricDescription> getTargetMetrics()
        Description copied from class: ExtendedMeasureProvider
        Gets the set of metrics the measure provider has to offer in case all of the source metrics requirements are satisfied.
        Specified by:
        getTargetMetrics in class ExtendedMeasureProvider
        Returns:
        Since instances of this class do only support one output metric, this method simply returns Collections.singleton(getTargetMetric()).
      • getDataSource

        public org.palladiosimulator.edp2.datastream.IDataSource getDataSource​(Set<org.palladiosimulator.edp2.datastream.IDataSource> availableDataSources)
        Description copied from class: ExtendedMeasureProvider
        Gets a IDataSource which contains the new metrics.
        Specified by:
        getDataSource in class ExtendedMeasureProvider
        Parameters:
        availableDataSources - the available data sources
        Returns:
        the respective IDataSource
      • getPropertyType

        public Class<?> getPropertyType​(String key)
      • setProperties

        public void setProperties​(Map<String,​Object> properties)
      • getDefaultConfiguration

        public Map<? extends String,​? extends Object> getDefaultConfiguration()
      • isPropertyNotSet

        public boolean isPropertyNotSet​(String key)
      • unsetProperty

        public void unsetProperty​(String key)
      • getAdapter

        public Object getAdapter​(Class adapter)