net.savantly.graphite.impl.DefaultGraphiteClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of graphite-client Show documentation
Show all versions of graphite-client Show documentation
Connects to a carbon/graphite instance to push metrics
The newest version!
package net.savantly.graphite.impl;
import java.util.Collection;
import net.savantly.graphite.CarbonMetric;
import net.savantly.graphite.CarbonSender;
import net.savantly.graphite.GraphiteClient;
public class DefaultGraphiteClient implements GraphiteClient {
private CarbonSender carbonSender;
/**
* @param carbonSender
*/
public DefaultGraphiteClient(CarbonSender carbonSender) {
this.carbonSender = carbonSender;
}
public void saveCarbonMetrics(CarbonMetric carbonMetric) {
carbonSender.sendToCarbon(carbonMetric);
}
public void saveCarbonMetrics(Collection carbonMetrics) {
carbonSender.sendToCarbon(carbonMetrics);
}
}