Search in sources :

Example 1 with ConnectionQueueStatsProvider

use of com.sun.enterprise.v3.services.impl.monitor.stats.ConnectionQueueStatsProvider 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 ConnectionQueueStatsProvider

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

the class GrizzlyMonitoring method registerConnectionQueueStatsProviderGlobal.

/**
 * Register server wide connection queue statistics provider for a network listener
 */
public void registerConnectionQueueStatsProviderGlobal(String name) {
    ConnectionQueueStatsProvider connectionQueueStatsProvider = new ConnectionQueueStatsProviderGlobal(name);
    ConnectionQueueStatsProvider oldConnectionQueueStatsProvider = connectionQueueStatsProvidersMap.put(name, connectionQueueStatsProvider);
    if (oldConnectionQueueStatsProvider != null) {
        StatsProviderManager.unregister(oldConnectionQueueStatsProvider);
    }
    StatsProviderManager.register(CONFIG_ELEMENT, PluginPoint.SERVER, subtreePrefix(name) + "/connection-queue", connectionQueueStatsProvider);
}
Also used : ConnectionQueueStatsProvider(com.sun.enterprise.v3.services.impl.monitor.stats.ConnectionQueueStatsProvider) ConnectionQueueStatsProviderGlobal(com.sun.enterprise.v3.services.impl.monitor.stats.ConnectionQueueStatsProviderGlobal)

Example 3 with ConnectionQueueStatsProvider

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

the class GrizzlyMonitoring method registerConnectionQueueStatsProvider.

/**
 * Register connection queue statistics provider for a network listener
 *
 * @param name network listener name
 */
public void registerConnectionQueueStatsProvider(String name) {
    ConnectionQueueStatsProvider connectionQueueStatsProvider = new ConnectionQueueStatsProvider(name);
    ConnectionQueueStatsProvider oldConnectionQueueStatsProvider = connectionQueueStatsProvidersMap.put(name, connectionQueueStatsProvider);
    if (oldConnectionQueueStatsProvider != null) {
        StatsProviderManager.unregister(oldConnectionQueueStatsProvider);
    }
    StatsProviderManager.register(CONFIG_ELEMENT, PluginPoint.SERVER, subtreePrefix(name) + "/connection-queue", connectionQueueStatsProvider);
}
Also used : ConnectionQueueStatsProvider(com.sun.enterprise.v3.services.impl.monitor.stats.ConnectionQueueStatsProvider)

Aggregations

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