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

com.proofpoint.http.client.jetty.IoPoolStats Maven / Gradle / Ivy

The newest version!
package com.proofpoint.http.client.jetty;

import com.proofpoint.reporting.Gauge;
import org.eclipse.jetty.util.thread.QueuedThreadPool;

class IoPoolStats
{
    private final QueuedThreadPool executor;

    IoPoolStats(QueuedThreadPool executor)
    {
        this.executor = executor;
    }

    @Gauge
    public int getFreeThreadCount() {
        return (executor.getMaxThreads() - executor.getThreads()) + executor.getIdleThreads() ;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy