etsy/statsd — pull request #224 by charlesdaniel (2012-12-25 01:16:35+00:00)
Title: Adding multi metric support to Java client (multiple metrics in a single datagram)

This just adds support to buffer several metrics into a single datagram packet.
You can specify the buffer size as well setup a timer to trigger a flush at an interval.
It defaults to being disabled so it should still work like the old version.
To enable call client.enableMultiMetrics(true);

// To enable multi metrics (aka more than 1 metric in a UDP packet) (disabled by default)
client.enableMultiMetrics(true); //disable by passing in false
// To fine-tune udp packet buffer size (default=1500)
client.setBufferSize((short) 1500);
// To force flush the buffer out (good idea to add to your shutdown path)
client.flush();