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

org.metricssampler.config.HttpConnectionPoolConfig Maven / Gradle / Ivy

The newest version!
package org.metricssampler.config;

public class HttpConnectionPoolConfig {
    private final int maxPerRoute;
    private final int maxTotal;
    private final int timeToLiveSeconds;

    public HttpConnectionPoolConfig(int maxPerRoute, int maxTotal, int timeToLiveSeconds) {
        this.maxPerRoute = maxPerRoute;
        this.maxTotal = maxTotal;
        this.timeToLiveSeconds = timeToLiveSeconds;
    }

    /**
     * @return the default maximal number of connections per route
     */
    public int getMaxPerRoute() {
        return maxPerRoute;
    }

    /**
     * @return the default maximal number of connections overall
     */
    public int getMaxTotal() {
        return maxTotal;
    }

    /**
     * @return the total time to live (TTL) for persistent connections - the life span of persistent connections
     * regardless of their expiration setting. No persistent connection will be re-used past its TTL value.
     */
    public int getTimeToLiveSeconds() {
        return timeToLiveSeconds;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy