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

com.clickzetta.platform.metrics.MetricConf Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package com.clickzetta.platform.metrics;

import com.google.common.base.Preconditions;

public class MetricConf {
  public static MetricConf DEFAULT = new MetricConf();

  private boolean enable = false;
  private int internalMs = 5 * 60 * 1000;

  public MetricConf() {}

  public boolean isEnable() {
    return enable;
  }

  public MetricConf setEnable(boolean enable) {
    this.enable = enable;
    return this;
  }

  public Integer getInternalMs() {
    return internalMs;
  }

  public MetricConf setInternalMs(int internalMs) {
    Preconditions.checkArgument(internalMs >= 1000);
    this.internalMs = internalMs;
    return this;
  }

  @Override
  public String toString() {
    return "MetricConf{" +
        "enable=" + enable +
        ", internalMs=" + internalMs +
        '}';
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy