Class NewtsConverterUtils


  • public class NewtsConverterUtils
    extends java.lang.Object
    Provides methods to convert between the Timeseries API world and Newts.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Map<java.lang.String,​java.lang.String> asMap​(java.util.Collection<org.opennms.integration.api.v1.timeseries.Tag> tags)  
      static java.util.Iterator<org.opennms.newts.api.Results.Row<org.opennms.newts.api.Sample>> samplesToNewtsRowIterator​(java.util.List<org.opennms.integration.api.v1.timeseries.Sample> allSamples)  
      static java.time.Instant toInstant​(org.opennms.newts.api.Timestamp timestamp)  
      static org.opennms.integration.api.v1.timeseries.Sample toTimeseriesSample​(org.opennms.newts.api.Results.Row<org.opennms.newts.api.Measurement> row, org.opennms.integration.api.v1.timeseries.Metric metric)  
      • Methods inherited from class java.lang.Object

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

      • NewtsConverterUtils

        public NewtsConverterUtils()
    • Method Detail

      • samplesToNewtsRowIterator

        public static java.util.Iterator<org.opennms.newts.api.Results.Row<org.opennms.newts.api.Sample>> samplesToNewtsRowIterator​(java.util.List<org.opennms.integration.api.v1.timeseries.Sample> allSamples)
      • toTimeseriesSample

        public static org.opennms.integration.api.v1.timeseries.Sample toTimeseriesSample​(org.opennms.newts.api.Results.Row<org.opennms.newts.api.Measurement> row,
                                                                                          org.opennms.integration.api.v1.timeseries.Metric metric)
      • toInstant

        public static java.time.Instant toInstant​(org.opennms.newts.api.Timestamp timestamp)
      • asMap

        public static java.util.Map<java.lang.String,​java.lang.String> asMap​(java.util.Collection<org.opennms.integration.api.v1.timeseries.Tag> tags)