All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.zodiac.monitor.metrics.config.MetricsPrometheusInfo Maven / Gradle / Ivy

package org.zodiac.monitor.metrics.config;

import java.util.Objects;

public class MetricsPrometheusInfo {

    public static final int DEFAULT_SCRAPE_INTERVAL = 30;

    private int scrapeInterval = DEFAULT_SCRAPE_INTERVAL;
    private String scrapePath = "/prometheus";

    public MetricsPrometheusInfo() {
    }

    public int getScrapeInterval() {
        return scrapeInterval;
    }

    public void setScrapeInterval(int scrapeInterval) {
        this.scrapeInterval = scrapeInterval;
    }

    public String getScrapePath() {
        return scrapePath;
    }

    public void setScrapePath(String scrapePath) {
        this.scrapePath = scrapePath;
    }

    @Override
    public int hashCode() {
        return Objects.hash(scrapeInterval, scrapePath);
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        MetricsPrometheusInfo other = (MetricsPrometheusInfo)obj;
        return scrapeInterval == other.scrapeInterval && Objects.equals(scrapePath, other.scrapePath);
    }

    @Override
    public String toString() {
        return "MetricsPrometheusInfo [scrapeInterval=" + scrapeInterval + ", scrapePath=" + scrapePath + "]";
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy