Class PickledGraphite

java.lang.Object
com.codahale.metrics.graphite.PickledGraphite
All Implemented Interfaces:
GraphiteSender, Closeable, AutoCloseable

public class PickledGraphite extends Object implements GraphiteSender
A client to a Carbon server that sends all metrics after they have been pickled in configurable sized batches
  • Constructor Details

    • PickledGraphite

      public PickledGraphite(InetSocketAddress address)
      Creates a new client which connects to the given address using the default SocketFactory. This defaults to a batchSize of 100
      Parameters:
      address - the address of the Carbon server
    • PickledGraphite

      public PickledGraphite(InetSocketAddress address, int batchSize)
      Creates a new client which connects to the given address using the default SocketFactory.
      Parameters:
      address - the address of the Carbon server
      batchSize - how many metrics are bundled into a single pickle request to graphite
    • PickledGraphite

      public PickledGraphite(InetSocketAddress address, SocketFactory socketFactory, int batchSize)
      Creates a new client which connects to the given address and socket factory.
      Parameters:
      address - the address of the Carbon server
      socketFactory - the socket factory
      batchSize - how many metrics are bundled into a single pickle request to graphite
    • PickledGraphite

      public PickledGraphite(InetSocketAddress address, SocketFactory socketFactory, Charset charset, int batchSize)
      Creates a new client which connects to the given address and socket factory using the given character set.
      Parameters:
      address - the address of the Carbon server
      socketFactory - the socket factory
      charset - the character set used by the server
      batchSize - how many metrics are bundled into a single pickle request to graphite
    • PickledGraphite

      public PickledGraphite(String hostname, int port)
      Creates a new client which connects to the given address using the default SocketFactory. This defaults to a batchSize of 100
      Parameters:
      hostname - the hostname of the Carbon server
      port - the port of the Carbon server
    • PickledGraphite

      public PickledGraphite(String hostname, int port, int batchSize)
      Creates a new client which connects to the given address using the default SocketFactory.
      Parameters:
      hostname - the hostname of the Carbon server
      port - the port of the Carbon server
      batchSize - how many metrics are bundled into a single pickle request to graphite
    • PickledGraphite

      public PickledGraphite(String hostname, int port, SocketFactory socketFactory, int batchSize)
      Creates a new client which connects to the given address and socket factory.
      Parameters:
      hostname - the hostname of the Carbon server
      port - the port of the Carbon server
      socketFactory - the socket factory
      batchSize - how many metrics are bundled into a single pickle request to graphite
    • PickledGraphite

      public PickledGraphite(String hostname, int port, SocketFactory socketFactory, Charset charset, int batchSize)
      Creates a new client which connects to the given address and socket factory using the given character set.
      Parameters:
      hostname - the hostname of the Carbon server
      port - the port of the Carbon server
      socketFactory - the socket factory
      charset - the character set used by the server
      batchSize - how many metrics are bundled into a single pickle request to graphite
  • Method Details