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

com.hubspot.singularity.config.IndexViewConfiguration Maven / Gradle / Ivy

package com.hubspot.singularity.config;

import java.util.Optional;

public class IndexViewConfiguration {
  private final UIConfiguration uiConfiguration;
  private final Integer defaultMemory;
  private final Integer defaultCpus;
  private final Integer defaultDisk;
  private final Integer agentHttpPort;
  private final Optional agentHttpsPort;
  private final int bounceExpirationMinutes;
  private final long healthcheckIntervalSeconds;
  private final long healthcheckTimeoutSeconds;
  private final Optional healthcheckMaxRetries;
  private final int startupTimeoutSeconds;
  private final boolean loadBalancingEnabled;
  private final Optional commonHostnameSuffixToOmit;
  private final Integer warnIfScheduledJobIsRunningPastNextRunPct;
  private final boolean generateAuthHeader;

  public IndexViewConfiguration(
    UIConfiguration uiConfiguration,
    Integer defaultMemory,
    Integer defaultCpus,
    Integer defaultDisk,
    Integer agentHttpPort,
    Optional agentHttpsPort,
    int bounceExpirationMinutes,
    long healthcheckIntervalSeconds,
    long healthcheckTimeoutSeconds,
    Optional healthcheckMaxRetries,
    int startupTimeoutSeconds,
    boolean loadBalancingEnabled,
    Optional commonHostnameSuffixToOmit,
    Integer warnIfScheduledJobIsRunningPastNextRunPct,
    boolean generateAuthHeader
  ) {
    this.uiConfiguration = uiConfiguration;
    this.defaultMemory = defaultMemory;
    this.defaultCpus = defaultCpus;
    this.defaultDisk = defaultDisk;
    this.agentHttpPort = agentHttpPort;
    this.agentHttpsPort = agentHttpsPort;
    this.bounceExpirationMinutes = bounceExpirationMinutes;
    this.healthcheckIntervalSeconds = healthcheckIntervalSeconds;
    this.healthcheckTimeoutSeconds = healthcheckTimeoutSeconds;
    this.healthcheckMaxRetries = healthcheckMaxRetries;
    this.startupTimeoutSeconds = startupTimeoutSeconds;
    this.loadBalancingEnabled = loadBalancingEnabled;
    this.commonHostnameSuffixToOmit = commonHostnameSuffixToOmit;
    this.warnIfScheduledJobIsRunningPastNextRunPct =
      warnIfScheduledJobIsRunningPastNextRunPct;
    this.generateAuthHeader = generateAuthHeader;
  }

  public UIConfiguration getUiConfiguration() {
    return uiConfiguration;
  }

  public Integer getDefaultMemory() {
    return defaultMemory;
  }

  public Integer getDefaultDisk() {
    return defaultDisk;
  }

  public Integer getDefaultCpus() {
    return defaultCpus;
  }

  public Integer getAgentHttpPort() {
    return agentHttpPort;
  }

  public Optional getAgentHttpsPort() {
    return agentHttpsPort;
  }

  @Deprecated
  public Integer getSlaveHttpPort() {
    return agentHttpPort;
  }

  @Deprecated
  public Optional getSlaveHttpsPort() {
    return agentHttpsPort;
  }

  public int getBounceExpirationMinutes() {
    return bounceExpirationMinutes;
  }

  public long getHealthcheckIntervalSeconds() {
    return healthcheckIntervalSeconds;
  }

  public long getHealthcheckTimeoutSeconds() {
    return healthcheckTimeoutSeconds;
  }

  public Optional getHealthcheckMaxRetries() {
    return healthcheckMaxRetries;
  }

  public int getStartupTimeoutSeconds() {
    return startupTimeoutSeconds;
  }

  public boolean isLoadBalancingEnabled() {
    return loadBalancingEnabled;
  }

  public Optional getCommonHostnameSuffixToOmit() {
    return commonHostnameSuffixToOmit;
  }

  public Integer getWarnIfScheduledJobIsRunningPastNextRunPct() {
    return warnIfScheduledJobIsRunningPastNextRunPct;
  }

  public boolean isGenerateAuthHeader() {
    return generateAuthHeader;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy