public class OpenTsdbGaugeWriter extends Object implements GaugeWriter
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.Constructor and Description |
---|
OpenTsdbGaugeWriter() |
Modifier and Type | Method and Description |
---|---|
void |
flush()
Flush the buffer without waiting for it to fill any further.
|
RestOperations |
getRestTemplate() |
void |
set(Metric<?> value)
Set the value of a metric.
|
void |
setBufferSize(int bufferSize) |
void |
setMediaType(MediaType mediaType) |
void |
setNamingStrategy(OpenTsdbNamingStrategy namingStrategy) |
void |
setRestTemplate(RestOperations restTemplate) |
void |
setUrl(String url) |
public RestOperations getRestTemplate()
public void setRestTemplate(RestOperations restTemplate)
public void setUrl(String url)
public void setBufferSize(int bufferSize)
public void setMediaType(MediaType mediaType)
public void setNamingStrategy(OpenTsdbNamingStrategy namingStrategy)
public void set(Metric<?> value)
GaugeWriter
set
in interface GaugeWriter
value
- the valuepublic void flush()
Copyright © 2015 Pivotal Software, Inc.. All rights reserved.