| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.monitors; |
| | | |
| | |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.InitializationException; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | | |
| | | |
| | |
| | | public class TraditionalWorkQueueMonitor |
| | | extends MonitorProvider |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | | "org.opends.server.monitors.WorkQueueMonitor"; |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | super("Work Queue Monitor Provider"); |
| | | |
| | | assert debugConstructor(CLASS_NAME); |
| | | |
| | | this.workQueue = workQueue; |
| | | } |
| | |
| | | public void initializeMonitorProvider(ConfigEntry configEntry) |
| | | throws ConfigException, InitializationException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializeMonitorProvider", |
| | | String.valueOf(configEntry)); |
| | | |
| | | maxBacklog = 0; |
| | | totalBacklog = 0; |
| | |
| | | */ |
| | | public String getMonitorInstanceName() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMonitorInstanceName"); |
| | | |
| | | return "Work Queue"; |
| | | } |
| | |
| | | */ |
| | | public long getUpdateInterval() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getUpdateInterval"); |
| | | |
| | | |
| | | // We will poll the work queue every 10 seconds. |
| | |
| | | */ |
| | | public void updateMonitorData() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "updateMonitorData"); |
| | | |
| | | int backlog = workQueue.size(); |
| | | totalBacklog += backlog; |
| | |
| | | */ |
| | | public ArrayList<Attribute> getMonitorData() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMonitorData"); |
| | | |
| | | int backlog = workQueue.size(); |
| | | totalBacklog += backlog; |