net.unit8.metrics.mackerel.MackerelServiceMetric Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of metrics-mackerel Show documentation
Show all versions of metrics-mackerel Show documentation
A reporter for Metrics which announces measurements to a Mackerel server.
package net.unit8.metrics.mackerel;
import java.io.Serializable;
public class MackerelServiceMetric implements Serializable {
private String name;
private long time;
private Double value;
public MackerelServiceMetric(String name, Double value, long time) {
this.name = name;
this.value = value;
this.time = time;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public long getTime() {
return time;
}
public void setTime(long time) {
this.time = time;
}
public Double getValue() {
return value;
}
public void setValue(Double value) {
this.value = value;
}
@Override
public String toString() {
return "MackerelServiceMetric{" +
"name='" + name + '\'' +
", time=" + time +
", value=" + value +
'}';
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
MackerelServiceMetric that = (MackerelServiceMetric) o;
return time == that.time && (name != null ? name.equals(that.name) : that.name == null) && (value != null ? value.equals(that.value) : that.value == null);
}
@Override
public int hashCode() {
int result = name != null ? name.hashCode() : 0;
result = 31 * result + (int) (time ^ (time >>> 32));
result = 31 * result + (value != null ? value.hashCode() : 0);
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy