org.wildfly.swarm.config.undertow.configuration.ConnectionLimit Maven / Gradle / Ivy
package org.wildfly.swarm.config.undertow.configuration;
import org.wildfly.config.runtime.Implicit;
import org.wildfly.config.runtime.ResourceType;
import org.wildfly.config.runtime.ModelNodeBinding;
/**
* Connection limiter handler
*/
@ResourceType("connection-limit")
public class ConnectionLimit {
private String key;
private Integer maxConcurrentRequests;
private Integer queueSize;
public ConnectionLimit(String key) {
this.key = key;
}
public String getKey() {
return this.key;
}
/**
* Maximum number of concurrent requests
*/
@ModelNodeBinding(detypedName = "max-concurrent-requests")
public Integer maxConcurrentRequests() {
return this.maxConcurrentRequests;
}
/**
* Maximum number of concurrent requests
*/
@SuppressWarnings("unchecked")
public ConnectionLimit maxConcurrentRequests(Integer value) {
this.maxConcurrentRequests = value;
return (ConnectionLimit) this;
}
/**
* Number of requests to queue before they start being rejected
*/
@ModelNodeBinding(detypedName = "queue-size")
public Integer queueSize() {
return this.queueSize;
}
/**
* Number of requests to queue before they start being rejected
*/
@SuppressWarnings("unchecked")
public ConnectionLimit queueSize(Integer value) {
this.queueSize = value;
return (ConnectionLimit) this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy