public final class GraphiteUdpStore extends Object implements MeasurementStore
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_UDP_MSG_SIZE |
| Constructor and Description |
|---|
GraphiteUdpStore(String hostPort) |
GraphiteUdpStore(String hostName,
int port) |
GraphiteUdpStore(URI uri) |
| Modifier and Type | Method and Description |
|---|---|
long |
alocateMeasurements(MeasurementsInfo measurement,
int sampleTimeMillis)
Make any allocations necessary for the following measurements.
|
void |
close() |
void |
flush()
flush all data that might be buffered by this store.
|
void |
saveMeasurements(long tableId,
long timeStampMillis,
long... measurements)
Save measurements.
|
String |
toString() |
static void |
writeMetric(MeasurementsInfo measurementInfo,
String measurementName,
long measurement,
long timeStampMillis,
Writer os)
Write with the plaintext protocol: https://graphite.readthedocs.io/en/0.9.10/feeding-carbon.html
|
public static final int MAX_UDP_MSG_SIZE
public GraphiteUdpStore(String hostPort) throws ObjectCreationException, URISyntaxException
public GraphiteUdpStore(URI uri) throws ObjectCreationException
ObjectCreationExceptionpublic GraphiteUdpStore(String hostName, int port) throws ObjectCreationException
ObjectCreationExceptionpublic void flush()
MeasurementStoreflush in interface MeasurementStorepublic long alocateMeasurements(MeasurementsInfo measurement, int sampleTimeMillis)
MeasurementStorealocateMeasurements in interface MeasurementStoremeasurement - - the information about the measurement(s)sampleTimeMillis - - the expected sample time. (interval between the stored measurements).public void saveMeasurements(long tableId,
long timeStampMillis,
long... measurements)
throws IOException
MeasurementStoresaveMeasurements in interface MeasurementStoretableId - - the table ID to store measurements for.timeStampMillis - - the timestamp of the measurement (millis since Jan 1 1970 UTC)measurements - - the measurements to persist. (same order as declared)IOException - - IO issues.public static void writeMetric(MeasurementsInfo measurementInfo, String measurementName, long measurement, long timeStampMillis, Writer os) throws IOException
measurementInfo - measuremrnt infomeasurementName - measurement namemeasurement - measurement valuetimeStampMillis - timestamp millis since epoch.os - the output writer to write to.IOExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2018 SPF4J. All rights reserved.