Class ThruNumberAndStringConversion

  • All Implemented Interfaces:

    public class ThruNumberAndStringConversion
    extends Object
    implements ConversionFunction
    Generic class for some standard type conversions. Not all type conversions are supported; some type conversions may be completely (or even worse, incompletely) inaccurate for your use case. Only a few of these have been tested and even those only incompletely. In most cases, you should roll your own conversion function and then apply using the ETLDest interface.
    • Constructor Detail

      • ThruNumberAndStringConversion

        public ThruNumberAndStringConversion​(ArchDBRTypes destDBRType)
    • Method Detail

      • shouldConvert

        public boolean shouldConvert​(EventStream srcEventStream,
                                     Timestamp streamStartTime,
                                     Timestamp streamEndTime)
                              throws IOException
        Specified by:
        shouldConvert in interface ConversionFunction
        streamStartTime - . In the appliance, streams are often chunked. streamStartTime and streamEndTime are the boundaries of the chunk being converted.
        IOException - Return true if there are any samples to convert in the source event stream. For example, in the failover merge usecase, one can check to see if the other server has any data during this time period. This provides a useful optimization in that files that no longer need to be converted are left unchanged.