类 OpenTsdbGaugeWriter

  • 所有已实现的接口:
    GaugeWriter

    public class OpenTsdbGaugeWriter
    extends Object
    implements GaugeWriter
    A GaugeWriter for the Open TSDB database (version 2.0), writing metrics to the HTTP endpoint provided by the server. Data are buffered according to the bufferSize property, and only flushed automatically when the buffer size is reached. Users should either manually flush() after writing a batch of data if that makes sense, or consider adding a Scheduled task to flush periodically.
    从以下版本开始:
    1.3.0
    • 构造器详细资料

      • OpenTsdbGaugeWriter

        public OpenTsdbGaugeWriter()
        Creates a new OpenTsdbGaugeWriter with the default connect (10 seconds) and read (30 seconds) timeouts.
      • OpenTsdbGaugeWriter

        public OpenTsdbGaugeWriter​(int connectTimeout,
                                   int readTimeout)
        Creates a new OpenTsdbGaugeWriter with the given millisecond connectTimeout and readTimeout.
        参数:
        connectTimeout - the connect timeout in milliseconds
        readTimeout - the read timeout in milliseconds
    • 方法详细资料

      • getRestTemplate

        public org.springframework.web.client.RestOperations getRestTemplate()
      • setRestTemplate

        public void setRestTemplate​(org.springframework.web.client.RestOperations restTemplate)
      • setMediaType

        public void setMediaType​(org.springframework.http.MediaType mediaType)
      • flush

        public void flush()
        Flush the buffer without waiting for it to fill any further.