class CollectdReporter extends ScheduledReporter {

    @Override
    @SuppressWarnings("rawtypes")
    public void report(SortedMap<String, Gauge> gauges, SortedMap<String, Counter> counters,
            SortedMap<String, Histogram> histograms, SortedMap<String, Meter> meters, SortedMap<String, Timer> timers) {
        MetaData.Builder metaData = new MetaData.Builder(hostName, clock.getTime() / 1000, period)
                .type(COLLECTD_TYPE_GAUGE);
        try {
            connect(sender);
            for (Map.Entry<String, Gauge> entry : gauges.entrySet()) {
                serializeGauge(metaData.plugin(entry.getKey()), entry.getValue());
            }
            for (Map.Entry<String, Counter> entry : counters.entrySet()) {
                serializeCounter(metaData.plugin(entry.getKey()), entry.getValue());
            }
            for (Map.Entry<String, Histogram> entry : histograms.entrySet()) {
                serializeHistogram(metaData.plugin(entry.getKey()), entry.getValue());
            }
            for (Map.Entry<String, Meter> entry : meters.entrySet()) {
                serializeMeter(metaData.plugin(entry.getKey()), entry.getValue());
            }
            for (Map.Entry<String, Timer> entry : timers.entrySet()) {
                serializeTimer(metaData.plugin(entry.getKey()), entry.getValue());
            }
        } catch (IOException e) {
            LOG.warn("Unable to report to Collectd", e);
        } finally {
            disconnect(sender);
        }
    }

    private  CollectdReporter(MetricRegistry registry,
            String hostname, Sender sender,
            ScheduledExecutorService executor, boolean shutdownExecutorOnStop,
            Clock clock, TimeUnit rateUnit, TimeUnit durationUnit,
            MetricFilter filter, Set<MetricAttribute> disabledMetricAttributes,
            String username, String password,
            SecurityLevel securityLevel);

}