Class JoiningMetricStreamConfig

    • Constructor Summary

      Constructors 
      Constructor Description
      JoiningMetricStreamConfig​(java.lang.String id, java.lang.String metric, com.elastisys.scale.commons.json.types.TimeInterval maxTimeDiff, java.util.Map<java.lang.String,​com.elastisys.autoscaler.core.monitoring.metricstreamer.api.MetricStream> inputStreams, javax.script.CompiledScript joinScript)
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getId()
      The id of the metric stream.
      java.util.Map<java.lang.String,​com.elastisys.autoscaler.core.monitoring.metricstreamer.api.MetricStream> getInputStreams()
      The input MetricStreams that are to be joined.
      javax.script.CompiledScript getJoinScript()
      The JavaScript that will join values read from the inputStreams.
      com.elastisys.scale.commons.json.types.TimeInterval getMaxTimeDiff()
      The maximum difference in time between observed metric stream values for the joined metric stream to apply its joinScript and produce a new value.
      java.lang.String getMetric()
      The name of the metric produced by this metric stream.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JoiningMetricStreamConfig

        public JoiningMetricStreamConfig​(java.lang.String id,
                                         java.lang.String metric,
                                         com.elastisys.scale.commons.json.types.TimeInterval maxTimeDiff,
                                         java.util.Map<java.lang.String,​com.elastisys.autoscaler.core.monitoring.metricstreamer.api.MetricStream> inputStreams,
                                         javax.script.CompiledScript joinScript)
        Parameters:
        id - The id of the metric stream. This is the id that will be used by clients wishing to subscribe to this metric stream.
        metric - The name of the metric produced by this metric stream. This is the metric that will be set for produced MetricValues.
        maxTimeDiff - The maximum difference in time between observed metric stream values for the joined metric stream to apply its joinScript and produce a new value. If stream metrics are farther apart than this, no new metric value is produced on the joined stream.
        inputStreams - The input MetricStreams that are to be joined. Keys are metric stream aliases and values are MetricStreams.
        joinScript -
    • Method Detail

      • getId

        public java.lang.String getId()
        The id of the metric stream. This is the id that will be used by clients wishing to subscribe to this metric stream.
        Returns:
      • getMetric

        public java.lang.String getMetric()
        The name of the metric produced by this metric stream. This is the metric that will be set for produced MetricValues.
        Returns:
      • getMaxTimeDiff

        public com.elastisys.scale.commons.json.types.TimeInterval getMaxTimeDiff()
        The maximum difference in time between observed metric stream values for the joined metric stream to apply its joinScript and produce a new value. If stream metrics are farther apart than this, no new metric value is produced on the joined stream.
        Returns:
      • getInputStreams

        public java.util.Map<java.lang.String,​com.elastisys.autoscaler.core.monitoring.metricstreamer.api.MetricStream> getInputStreams()
        The input MetricStreams that are to be joined. Keys are metric stream aliases and values are MetricStreams.
        Returns:
      • getJoinScript

        public javax.script.CompiledScript getJoinScript()
        The JavaScript that will join values read from the inputStreams.
        Returns: