Search in sources :

Example 1 with MetricCounters

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();
}
Also used : MetricCounters(com.sun.messaging.jmq.util.MetricCounters)

Example 2 with 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);
}
Also used : MetricCounters(com.sun.messaging.jmq.util.MetricCounters)

Example 3 with MetricCounters

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));
}
Also used : MetricManager(com.sun.messaging.jmq.jmsserver.service.MetricManager) MetricCounters(com.sun.messaging.jmq.util.MetricCounters)

Example 4 with MetricCounters

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));
}
Also used : MetricManager(com.sun.messaging.jmq.jmsserver.service.MetricManager) MetricCounters(com.sun.messaging.jmq.util.MetricCounters)

Example 5 with MetricCounters

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));
    }
}
Also used : ServiceInfo(com.sun.messaging.jmq.util.admin.ServiceInfo) MetricCounters(com.sun.messaging.jmq.util.MetricCounters)

Aggregations

MetricCounters (com.sun.messaging.jmq.util.MetricCounters)18 ServiceInfo (com.sun.messaging.jmq.util.admin.ServiceInfo)9 MetricManager (com.sun.messaging.jmq.jmsserver.service.MetricManager)4 BrokerAdmin (com.sun.messaging.jmq.admin.bkrutil.BrokerAdmin)1 BrokerAdminException (com.sun.messaging.jmq.admin.bkrutil.BrokerAdminException)1 Destination (com.sun.messaging.jmq.jmsserver.core.Destination)1 ServiceManager (com.sun.messaging.jmq.jmsserver.service.ServiceManager)1 IMQConnection (com.sun.messaging.jmq.jmsserver.service.imq.IMQConnection)1 IMQService (com.sun.messaging.jmq.jmsserver.service.imq.IMQService)1 DestMetricsCounters (com.sun.messaging.jmq.util.DestMetricsCounters)1 MetricData (com.sun.messaging.jmq.util.MetricData)1 SizeString (com.sun.messaging.jmq.util.SizeString)1 Hashtable (java.util.Hashtable)1