Class JoiningMetricStreamConfig
- java.lang.Object
-
- com.elastisys.autoscaler.metricstreamers.streamjoiner.stream.JoiningMetricStreamConfig
-
public class JoiningMetricStreamConfig extends java.lang.ObjectA configuration used by aJoiningMetricStream.- See Also:
JoiningMetricStream
-
-
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)Creates aJoiningMetricStreamConfig.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetId()The id of the metric stream.java.util.Map<java.lang.String,com.elastisys.autoscaler.core.monitoring.metricstreamer.api.MetricStream>getInputStreams()The inputMetricStreams that are to be joined.javax.script.CompiledScriptgetJoinScript()The JavaScript that will join values read from theinputStreams.com.elastisys.scale.commons.json.types.TimeIntervalgetMaxTimeDiff()The maximum difference in time between observed metric stream values for the joined metric stream to apply itsjoinScriptand produce a new value.java.lang.StringgetMetric()The name of the metric produced by this metric stream.
-
-
-
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)Creates aJoiningMetricStreamConfig.- 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 producedMetricValues.maxTimeDiff- The maximum difference in time between observed metric stream values for the joined metric stream to apply itsjoinScriptand produce a new value. If stream metrics are farther apart than this, no new metric value is produced on the joined stream.inputStreams- The inputMetricStreams that are to be joined. Keys are metric stream aliases and values areMetricStreams.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 producedMetricValues.- 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 itsjoinScriptand 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 inputMetricStreams that are to be joined. Keys are metric stream aliases and values areMetricStreams.- Returns:
-
getJoinScript
public javax.script.CompiledScript getJoinScript()
The JavaScript that will join values read from theinputStreams.- Returns:
-
-