use of com.sun.messaging.jmq.util.MetricCounters in project openmq by eclipse-ee4j.
the class MetricManager method reset.
public synchronized void reset() {
deadTotalsByService.clear();
lastSample = new MetricCounters();
}
use of com.sun.messaging.jmq.util.MetricCounters in project openmq by eclipse-ee4j.
the class MetricManager method depositTotals.
/**
* Used by connections that are going away to deposit their totals, so they won't be lost.
*/
public synchronized void depositTotals(String service, MetricCounters counters) {
MetricCounters mc = (MetricCounters) deadTotalsByService.get(service);
if (mc == null) {
mc = new MetricCounters();
deadTotalsByService.put(service, mc);
}
mc.update(counters);
}
use of com.sun.messaging.jmq.util.MetricCounters in project openmq by eclipse-ee4j.
the class ServiceManagerConfig method getMinThreads.
public Integer getMinThreads() {
MetricManager mm = Globals.getMetricManager();
MetricCounters mc = mm.getMetricCounters(null);
return (Integer.valueOf(mc.threadsLowWater));
}
use of com.sun.messaging.jmq.util.MetricCounters in project openmq by eclipse-ee4j.
the class ServiceManagerConfig method getMaxThreads.
public Integer getMaxThreads() {
MetricManager mm = Globals.getMetricManager();
MetricCounters mc = mm.getMetricCounters(null);
return (Integer.valueOf(mc.threadsHighWater));
}
use of com.sun.messaging.jmq.util.MetricCounters in project openmq by eclipse-ee4j.
the class ServiceMonitor method getNumPktsIn.
public Long getNumPktsIn() {
ServiceInfo si = ServiceUtil.getServiceInfo(service);
MetricCounters metrics = si.metrics;
if (metrics != null) {
return (Long.valueOf(metrics.packetsIn));
} else {
return (Long.valueOf(-1));
}
}
Aggregations