Interface StatsdChannel

All Superinterfaces:
AutoCloseable, Closeable

public interface StatsdChannel extends Closeable
Statsd destination channel.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Connect to the destination.
    int
    send(ByteBuffer buffer)
    Send data to the destination.

    Methods inherited from interface java.io.Closeable

    close
  • Method Details

    • connect

      void connect() throws IOException
      Connect to the destination.

      It is guaranteed that the sender will call Closeable.close() before attempting to reconnect.

      Throws:
      IOException - if connection was not established
    • send

      int send(ByteBuffer buffer) throws IOException
      Send data to the destination.
      Parameters:
      buffer - data
      Returns:
      bytes written, or -1 if destination is not available
      Throws:
      IOException - if data could not be written