Interface InfluxDbSender

    • Method Detail

      • send

        void send​(StringBuilder measurement)
           throws IOException
        Sends the given measurement to the server.

        NOTE: The caller may modify the measurement buffer after this call. The implementation of this method MUST NOT keep any reference to the buffer after this call.

        Parameters:
        measurement - a single measurement line, according to the InfluxDb line protocol including a trailing newline.
        Throws:
        IOException - if there was an error sending the metric
      • flush

        void flush()
            throws IOException
        Flushes buffer, if applicable
        Throws:
        IOException - if there was an error during flushing metrics to the server
      • disconnect

        void disconnect()
                 throws IOException
        Disconnects from the server.
        Throws:
        IOException - if there is an error disconnecting
      • isConnected

        boolean isConnected()
        Returns true if ready to send data