// Add counters for connections that no longer exist
if (serviceName == null) {
// Sum values for all services
Enumeration e;
for (e = deadTotalsByService.elements(); e.hasMoreElements(); ) {
totals.update((MetricCounters)e.nextElement());
}
} else {
// Sum values for just the specified service
MetricCounters deadTotals =
(MetricCounters)deadTotalsByService.get(serviceName);