public class PickledGraphite
extends java.lang.Object
| Constructor and Description |
|---|
PickledGraphite(java.net.InetSocketAddress address)
Creates a new client which connects to the given address using the default
SocketFactory. |
PickledGraphite(java.net.InetSocketAddress address,
int batchSize)
Creates a new client which connects to the given address using the default
SocketFactory. |
PickledGraphite(java.net.InetSocketAddress address,
javax.net.SocketFactory socketFactory,
java.nio.charset.Charset charset,
int batchSize)
Creates a new client which connects to the given address and socket factory using the given character set.
|
PickledGraphite(java.net.InetSocketAddress address,
javax.net.SocketFactory socketFactory,
int batchSize)
Creates a new client which connects to the given address and socket factory.
|
PickledGraphite(java.lang.String hostname,
int port)
Creates a new client which connects to the given address using the default
SocketFactory. |
PickledGraphite(java.lang.String hostname,
int port,
int batchSize)
Creates a new client which connects to the given address using the default
SocketFactory. |
PickledGraphite(java.lang.String hostname,
int port,
javax.net.SocketFactory socketFactory,
java.nio.charset.Charset charset,
int batchSize)
Creates a new client which connects to the given address and socket factory using the given character set.
|
PickledGraphite(java.lang.String hostname,
int port,
javax.net.SocketFactory socketFactory,
int batchSize)
Creates a new client which connects to the given address and socket factory.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
connect() |
void |
flush() |
int |
getFailures() |
boolean |
isConnected() |
void |
send(java.lang.String name,
java.lang.String value,
long timestamp)
Convert the metric to a python tuple of the form:
(timestamp, (name, value))
And add it to the list of metrics.
|
public PickledGraphite(java.net.InetSocketAddress address)
SocketFactory. This defaults
to a batchSize of 100address - the address of the Carbon serverpublic PickledGraphite(java.net.InetSocketAddress address,
int batchSize)
SocketFactory.address - the address of the Carbon serverbatchSize - how many metrics are bundled into a single pickle request to graphitepublic PickledGraphite(java.net.InetSocketAddress address,
javax.net.SocketFactory socketFactory,
int batchSize)
address - the address of the Carbon serversocketFactory - the socket factorybatchSize - how many metrics are bundled into a single pickle request to graphitepublic PickledGraphite(java.net.InetSocketAddress address,
javax.net.SocketFactory socketFactory,
java.nio.charset.Charset charset,
int batchSize)
address - the address of the Carbon serversocketFactory - the socket factorycharset - the character set used by the serverbatchSize - how many metrics are bundled into a single pickle request to graphitepublic PickledGraphite(java.lang.String hostname,
int port)
SocketFactory. This defaults
to a batchSize of 100hostname - the hostname of the Carbon serverport - the port of the Carbon serverpublic PickledGraphite(java.lang.String hostname,
int port,
int batchSize)
SocketFactory.hostname - the hostname of the Carbon serverport - the port of the Carbon serverbatchSize - how many metrics are bundled into a single pickle request to graphitepublic PickledGraphite(java.lang.String hostname,
int port,
javax.net.SocketFactory socketFactory,
int batchSize)
hostname - the hostname of the Carbon serverport - the port of the Carbon serversocketFactory - the socket factorybatchSize - how many metrics are bundled into a single pickle request to graphitepublic PickledGraphite(java.lang.String hostname,
int port,
javax.net.SocketFactory socketFactory,
java.nio.charset.Charset charset,
int batchSize)
hostname - the hostname of the Carbon serverport - the port of the Carbon serversocketFactory - the socket factorycharset - the character set used by the serverbatchSize - how many metrics are bundled into a single pickle request to graphitepublic void connect()
throws java.lang.IllegalStateException,
java.io.IOException
java.lang.IllegalStateExceptionjava.io.IOExceptionpublic boolean isConnected()
public void send(java.lang.String name,
java.lang.String value,
long timestamp)
throws java.io.IOException
name - the name of the metricvalue - the value of the metrictimestamp - the timestamp of the metricjava.io.IOException - if there was an error sending the metricpublic void flush()
throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
java.io.IOExceptionpublic int getFailures()
Copyright © 2015 Artem Dmitriev. All Rights Reserved.