Class InfluxdbDataPointSerializer

  • All Implemented Interfaces:
    java.util.function.Function<com.elastisys.autoscaler.core.api.types.MetricValue,​java.lang.String>

    public class InfluxdbDataPointSerializer
    extends java.lang.Object
    implements java.util.function.Function<com.elastisys.autoscaler.core.api.types.MetricValue,​java.lang.String>
    A Function that serializes MetricValues to the line protocol representation required when submitting data points to InfluxDB. See the InfluxDB documentation for details.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String apply​(com.elastisys.autoscaler.core.api.types.MetricValue value)
      Serializes a given MetricValue to the line protocol format prescribed by InfluxDB.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.Function

        andThen, compose
    • Constructor Detail

      • InfluxdbDataPointSerializer

        public InfluxdbDataPointSerializer()
    • Method Detail

      • apply

        public java.lang.String apply​(com.elastisys.autoscaler.core.api.types.MetricValue value)
        Serializes a given MetricValue to the line protocol format prescribed by InfluxDB.

        <measurement>,<tag1>=<value1>,<tag2>=<value2> <fieldKey>=<value> <timestamp>

        Specified by:
        apply in interface java.util.function.Function<com.elastisys.autoscaler.core.api.types.MetricValue,​java.lang.String>
        Parameters:
        value - a MetricValue
        Returns:
        The line protocol representation of the MetricValue.