Package com.codahale.metrics.graphite
Interface GraphiteSender
-
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
Graphite
,GraphiteRabbitMQ
,GraphiteUDP
,PickledGraphite
public interface GraphiteSender extends Closeable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
connect()
Connects to the server.void
flush()
Flushes buffer, if applicableint
getFailures()
Returns the number of failed writes to the server.boolean
isConnected()
Returns true if ready to send datavoid
send(String name, String value, long timestamp)
Sends the given measurement to the server.
-
-
-
Method Detail
-
connect
void connect() throws IllegalStateException, IOException
Connects to the server.- Throws:
IllegalStateException
- if the client is already connectedIOException
- if there is an error connecting
-
send
void send(String name, String value, long timestamp) throws IOException
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
void flush() throws IOException
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
-
-