Package com.codahale.metrics.graphite
Interface GraphiteSender
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
Graphite,GraphiteRabbitMQ,GraphiteUDP,PickledGraphite
-
Method Details
-
connect
Connects to the server.- Throws:
IllegalStateException- if the client is already connectedIOException- if there is an error connecting
-
send
Sends the given measurement to the server.- Parameters:
name- the name of the metricvalue- the value of the metrictimestamp- the timestamp of the metric- Throws:
IOException- if there was an error sending the metric
-
flush
Flushes buffer, if applicable- Throws:
IOException- if there was an error during flushing metrics to the socket
-
isConnected
boolean isConnected()Returns true if ready to send data -
getFailures
int getFailures()Returns the number of failed writes to the server.- Returns:
- the number of failed writes to the server
-