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

io.dropwizard.core.setup.HealthCheckConfiguration Maven / Gradle / Ivy

There is a newer version: 5.0.0-alpha.4
Show newest version
package io.dropwizard.core.setup;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.StringJoiner;

/**
 * A factory for configuring the health check sub-system for the environment.
 * 

* Configuration Parameters: *

* * * * * * * * * * * * * * * * * * * * * * * * * *
NameDefaultDescription
servletEnabledtrueWhether to enable the admin health check servlet.
minThreads1The minimum number of threads for executing health checks.
maxThreads4The maximum number of threads for executing health checks.
workQueueSize1The length of the work queue for health check executions.
* * @since 2.0 */ public class HealthCheckConfiguration { private boolean servletEnabled = true; private int minThreads = 1; private int maxThreads = 4; private int workQueueSize = 1; @JsonProperty("servletEnabled") public boolean isServletEnabled() { return servletEnabled; } @JsonProperty("servletEnabled") public void setServletEnabled(boolean servletEnabled) { this.servletEnabled = servletEnabled; } @JsonProperty("minThreads") public int getMinThreads() { return minThreads; } @JsonProperty("minThreads") public void setMinThreads(int minThreads) { this.minThreads = minThreads; } @JsonProperty("maxThreads") public int getMaxThreads() { return maxThreads; } @JsonProperty("maxThreads") public void setMaxThreads(int maxThreads) { this.maxThreads = maxThreads; } @JsonProperty("workQueueSize") public int getWorkQueueSize() { return workQueueSize; } @JsonProperty("workQueueSize") public void setWorkQueueSize(int workQueueSize) { this.workQueueSize = workQueueSize; } @Override public String toString() { return new StringJoiner(", ", HealthCheckConfiguration.class.getSimpleName() + "[", "]") .add("servletEnabled= " + servletEnabled) .add("minThreads=" + minThreads) .add("maxThreads=" + maxThreads) .add("workQueueSize=" + workQueueSize) .toString(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy