public interface GraphiteSender extends Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Connects to the server.
|
void |
flush()
Flushes buffer, if applicable
|
int |
getFailures()
Returns the number of failed writes to the server.
|
boolean |
isConnected()
Returns true if ready to send data
|
void |
send(String name,
String value,
long timestamp)
Sends the given measurement to the server.
|
void connect()
throws IllegalStateException,
IOException
IllegalStateException - if the client is already connectedIOException - if there is an error connectingvoid send(String name, String value, long timestamp) throws IOException
name - the name of the metricvalue - the value of the metrictimestamp - the timestamp of the metricIOException - if there was an error sending the metricvoid flush()
throws IOException
IOException - if there was an error during flushing metrics to the socketboolean isConnected()
int getFailures()
Copyright © 2020. All rights reserved.