How to find default thread pool size programmatically

To find out jetty thread pool size programmatically :

ThreadPool tp = (ThreadPool) server.getThreadPool();
if(tp instanceof QueuedThreadPool) {
QueuedThreadPool qtp = (QueuedThreadPool) tp;
int minThreads = qtp.getMinThreads();
int maxThreads = qtp.getMaxThreads();
LOG.info("minThreads : " + minThreads + "\t maxThreads :" + maxThreads)
}

Comments

Popular posts from this blog

Streaming Spring boot logs to ELK stack

Keyboard Shortcuts That Work in All Web Browsers

How TOTP Works: Generating OTPs Without Internet Connection