public class LibratoBatch extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_BATCH_SIZE |
protected List<Measurement> |
measurements |
| Constructor and Description |
|---|
LibratoBatch(int postBatchSize,
Sanitizer sanitizer,
long timeout,
TimeUnit timeoutUnit,
String agentIdentifier,
HttpPoster httpPoster)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCounterMeasurement(String name,
Long value) |
void |
addCounterMeasurement(String source,
Number period,
String name,
Long value) |
void |
addCounterMeasurement(String source,
String name,
Long value) |
void |
addGaugeMeasurement(String name,
Number value) |
void |
addGaugeMeasurement(String source,
Number period,
String name,
Number value) |
void |
addGaugeMeasurement(String source,
String name,
Number value) |
void |
addMeasurement(Measurement measurement)
for advanced measurement fu
|
BatchResult |
post(String source) |
BatchResult |
post(String source,
Long epoch) |
public static final int DEFAULT_BATCH_SIZE
protected final List<Measurement> measurements
public LibratoBatch(int postBatchSize,
Sanitizer sanitizer,
long timeout,
TimeUnit timeoutUnit,
String agentIdentifier,
HttpPoster httpPoster)
postBatchSize - size at which to break up the batchsanitizer - the sanitizer to use for cleaning up metric names to comply with librato api requirementstimeout - time allowed for posttimeoutUnit - unit for timeoutagentIdentifier - a string that identifies the poster (such as the name of a library/program using librato-java)httpPoster - the HttpPoster that will send the data to Libratopublic void addMeasurement(Measurement measurement)
public void addCounterMeasurement(String source, Number period, String name, Long value)
public void addGaugeMeasurement(String source, Number period, String name, Number value)
public BatchResult post(String source)
public BatchResult post(String source, Long epoch)
Copyright © 2016. All rights reserved.