// Path: metrics-core/src/main/java/com/flozano/metrics/client/MetricValue.java
// public abstract class MetricValue {
// 	private final long value;
// 	private final String name;
// 	private final Double sampleRate;
// 	private final String suffix;
// 
// 	private final Tags tags;
// 
// 	protected MetricValue(String name, long value, Double sampleRate, String suffix, Tags tags) {
// 		this.name = requireNonNull(name);
// 		this.value = value;
// 		this.sampleRate = validateSampleRate(sampleRate);
// 		this.suffix = suffix;
// 		this.tags = tags == null ? Tags.empty() : tags;
// 	}
// 
// 	public boolean isSignRequiredInValue() {
// 		return false;
// 	}
// 
// 	public static Double validateSampleRate(Double sampleRate) {
// 		if (sampleRate == null) {
// 			return null;
// 		}
// 		if (sampleRate < 0 || sampleRate > 1) {
// 			throw new IllegalArgumentException("sample rate must be between 0 and 1");
// 		}
// 
// 		return sampleRate;
// 	}
// 
// 	public String getName() {
// 		return name;
// 	}
// 
// 	public Double getSampleRate() {
// 		return sampleRate;
// 	}
// 
// 	public long getValue() {
// 		return value;
// 	}
// 
// 	public String getCode() {
// 		return suffix;
// 	}
// 
// 	public Tags getTags() {
// 		return tags;
// 	}
// 
// 	public abstract MetricValue withRate(double rate);
// 
// 	public abstract MetricValue withName(String string);
// 
// }
// 
// Path: metrics-core/src/main/java/com/flozano/metrics/client/MetricsClient.java
// public interface MetricsClient extends AutoCloseable {
// 
// 	/**
// 	 * Send a bunch of metrics
// 	 *
// 	 * @param metrics
// 	 *            the metrics to be sent
// 	 * @return a future that allows to hook on the operation completion
// 	 */
// 	CompletableFuture<Void> send(MetricValue... metrics);
// 
// 	/**
// 	 * Send a bunch of metrics
// 	 *
// 	 * @param metrics
// 	 *            the metrics to be sent
// 	 * @return a future that allows to hook on the operation completion
// 	 */
// 	default CompletableFuture<Void> send(Stream<MetricValue> metrics) {
// 		List<MetricValue> values = metrics.collect(Collectors.toList());
// 		return send(values.toArray(new MetricValue[values.size()]));
// 	}
// 
// 	/**
// 	 * Creates a batch version of this client.
// 	 *
// 	 * The batch version will only send the recorded metrics when the
// 	 * {@link MetricsClient#close()} method is performed.
// 	 *
// 	 * Closing batch statsD client will NOT close the underlying client.
// 	 *
// 	 * @return the batched version
// 	 */
// 	MetricsClient batch();
// 
// 	@Override
// 	public void close();
// 
// }


import static java.util.Objects.requireNonNull;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.flozano.metrics.client.MetricValue;
import com.flozano.metrics.client.MetricsClient;
package com.flozano.metrics.client.statsd;





final class BatchStatsDClient implements MetricsClient {

	private static final Logger LOGGER = LoggerFactory
// Path: metrics-core/src/main/java/com/flozano/metrics/client/MetricValue.java
// public abstract class MetricValue {
// 	private final long value;
// 	private final String name;
// 	private final Double sampleRate;
// 	private final String suffix;
// 
// 	private final Tags tags;
// 
// 	protected MetricValue(String name, long value, Double sampleRate, String suffix, Tags tags) {
// 		this.name = requireNonNull(name);
// 		this.value = value;
// 		this.sampleRate = validateSampleRate(sampleRate);
// 		this.suffix = suffix;
// 		this.tags = tags == null ? Tags.empty() : tags;
// 	}
// 
// 	public boolean isSignRequiredInValue() {
// 		return false;
// 	}
// 
// 	public static Double validateSampleRate(Double sampleRate) {
// 		if (sampleRate == null) {
// 			return null;
// 		}
// 		if (sampleRate < 0 || sampleRate > 1) {
// 			throw new IllegalArgumentException("sample rate must be between 0 and 1");
// 		}
// 
// 		return sampleRate;
// 	}
// 
// 	public String getName() {
// 		return name;
// 	}
// 
// 	public Double getSampleRate() {
// 		return sampleRate;
// 	}
// 
// 	public long getValue() {
// 		return value;
// 	}
// 
// 	public String getCode() {
// 		return suffix;
// 	}
// 
// 	public Tags getTags() {
// 		return tags;
// 	}
// 
// 	public abstract MetricValue withRate(double rate);
// 
// 	public abstract MetricValue withName(String string);
// 
// }
// 
// Path: metrics-core/src/main/java/com/flozano/metrics/client/MetricsClient.java
// public interface MetricsClient extends AutoCloseable {
// 
// 	/**
// 	 * Send a bunch of metrics
// 	 *
// 	 * @param metrics
// 	 *            the metrics to be sent
// 	 * @return a future that allows to hook on the operation completion
// 	 */
// 	CompletableFuture<Void> send(MetricValue... metrics);
// 
// 	/**
// 	 * Send a bunch of metrics
// 	 *
// 	 * @param metrics
// 	 *            the metrics to be sent
// 	 * @return a future that allows to hook on the operation completion
// 	 */
// 	default CompletableFuture<Void> send(Stream<MetricValue> metrics) {
// 		List<MetricValue> values = metrics.collect(Collectors.toList());
// 		return send(values.toArray(new MetricValue[values.size()]));
// 	}
// 
// 	/**
// 	 * Creates a batch version of this client.
// 	 *
// 	 * The batch version will only send the recorded metrics when the
// 	 * {@link MetricsClient#close()} method is performed.
// 	 *
// 	 * Closing batch statsD client will NOT close the underlying client.
// 	 *
// 	 * @return the batched version
// 	 */
// 	MetricsClient batch();
// 
// 	@Override
// 	public void close();
// 
// }


// Path: metrics-statsd/src/main/java/com/flozano/metrics/client/statsd/BatchStatsDClient.java
import static java.util.Objects.requireNonNull;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.flozano.metrics.client.MetricValue;
import com.flozano.metrics.client.MetricsClient;

package com.flozano.metrics.client.statsd;





final class BatchStatsDClient implements MetricsClient {

	private static final Logger LOGGER = LoggerFactory
			.getLogger(MetricsClient.class);