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;
}
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);
}
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);
}
Aggregations