Search in sources :

Example 1 with JettyThreadPool

use of com.dtp.common.config.web.JettyThreadPool in project dynamic-tp by lyh200.

the class JettyTpHandler method updateWebServerTp.

@Override
public void updateWebServerTp(DtpProperties dtpProperties) {
    JettyThreadPool jettyTp = dtpProperties.getJettyTp();
    if (Objects.isNull(jettyTp)) {
        return;
    }
    int oldMinThreads = convertAndGet().getMinThreads();
    int oldMaxThreads = convertAndGet().getMaxThreads();
    convertAndGet().setMinThreads(jettyTp.getMin());
    convertAndGet().setMaxThreads(jettyTp.getMax());
    log.info("DynamicTp jettyWebServerTp refreshed end, minThreads: [{}], maxThreads: [{}]", String.format(PROPERTIES_CHANGE_SHOW_STYLE, oldMinThreads, jettyTp.getMin()), String.format(PROPERTIES_CHANGE_SHOW_STYLE, oldMaxThreads, jettyTp.getMax()));
}
Also used : JettyThreadPool(com.dtp.common.config.web.JettyThreadPool)

Aggregations

JettyThreadPool (com.dtp.common.config.web.JettyThreadPool)1