Search in sources :

Example 1 with GrizzlyMonitoring

use of com.sun.enterprise.v3.services.impl.monitor.GrizzlyMonitoring in project Payara by payara.

the class HttpServiceStatsProvider method getInitialOpenConnections.

private long getInitialOpenConnections() {
    long initialCount = 0;
    GrizzlyMonitoring monitoring = Globals.get(GrizzlyService.class).getMonitoring();
    if (monitoring != null) {
        for (String networkListener : networkListeners) {
            ConnectionQueueStatsProvider connectionQueueStats = monitoring.getConnectionQueueStatsProvider(networkListener);
            initialCount += connectionQueueStats.getOpenConnectionsCount().getCount();
        }
    } else {
        logger.log(Level.FINER, "Tried to get monitoring service connections before service started");
    }
    return initialCount;
}
Also used : GrizzlyMonitoring(com.sun.enterprise.v3.services.impl.monitor.GrizzlyMonitoring) GrizzlyService(com.sun.enterprise.v3.services.impl.GrizzlyService) ConnectionQueueStatsProvider(com.sun.enterprise.v3.services.impl.monitor.stats.ConnectionQueueStatsProvider)

Example 2 with GrizzlyMonitoring

use of com.sun.enterprise.v3.services.impl.monitor.GrizzlyMonitoring in project Payara by payara.

the class GlassfishNetworkListener method registerMonitoringStatsProviders.

protected void registerMonitoringStatsProviders() {
    final String nameLocal = name;
    final GrizzlyMonitoring monitoring = grizzlyService.getMonitoring();
    if (monitoring.getThreadPoolStatsProvider(nameLocal) == null) {
        monitoring.registerThreadPoolStatsProvider(nameLocal);
    }
    if (monitoring.getKeepAliveStatsProvider(nameLocal) == null) {
        monitoring.registerKeepAliveStatsProvider(nameLocal);
    }
    if (monitoring.getFileCacheStatsProvider(nameLocal) == null) {
        monitoring.registerFileCacheStatsProvider(nameLocal);
    }
    if (monitoring.getConnectionQueueStatsProvider(nameLocal) == null) {
        monitoring.registerConnectionQueueStatsProvider(nameLocal);
    }
}
Also used : GrizzlyMonitoring(com.sun.enterprise.v3.services.impl.monitor.GrizzlyMonitoring)

Example 3 with GrizzlyMonitoring

use of com.sun.enterprise.v3.services.impl.monitor.GrizzlyMonitoring in project Payara by payara.

the class GlassfishNetworkListener method unregisterMonitoringStatsProviders.

protected void unregisterMonitoringStatsProviders() {
    final String localName = name;
    final GrizzlyMonitoring monitoring = grizzlyService.getMonitoring();
    monitoring.unregisterThreadPoolStatsProvider(localName);
    monitoring.unregisterKeepAliveStatsProvider(localName);
    monitoring.unregisterFileCacheStatsProvider(localName);
    monitoring.unregisterConnectionQueueStatsProvider(localName);
}
Also used : GrizzlyMonitoring(com.sun.enterprise.v3.services.impl.monitor.GrizzlyMonitoring)

Aggregations

GrizzlyMonitoring (com.sun.enterprise.v3.services.impl.monitor.GrizzlyMonitoring)3 GrizzlyService (com.sun.enterprise.v3.services.impl.GrizzlyService)1 ConnectionQueueStatsProvider (com.sun.enterprise.v3.services.impl.monitor.stats.ConnectionQueueStatsProvider)1