Package io.dropwizard.metrics5.graphite
Interface GraphiteSender
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
Graphite,GraphiteRabbitMQ,GraphiteUDP,PickledGraphite
public interface GraphiteSender extends Closeable
-
Method Summary
Modifier and Type Method Description voidconnect()Connects to the server.voidflush()Flushes buffer, if applicableintgetFailures()Returns the number of failed writes to the server.booleanisConnected()Returns true if ready to send datavoidsend(String name, String value, long timestamp)Sends the given measurement to the server.
-
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
-