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