![JAR search and dependency download from the Maven repository](/logo.png)
net.savantly.graphite.CarbonFactory 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;
import java.net.SocketException;
import java.net.UnknownHostException;
import net.savantly.graphite.impl.SimpleCarbonMetric;
import net.savantly.graphite.impl.DefaultCarbonSender;
public class CarbonFactory {
public static CarbonMetric getDefaultCarbonMetric(String metricName, String value, long epoch){
return new SimpleCarbonMetric(metricName, value, epoch);
}
public static CarbonSender getDefaultCarbonSender(String graphiteHost, int carbonPort, String sourceIp) throws UnknownHostException, SocketException{
return new DefaultCarbonSender(graphiteHost, carbonPort, sourceIp);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy