| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.monitors; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCought; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | |
| | | import org.opends.server.api.AttributeSyntax; |
| | | import org.opends.server.api.MonitorProvider; |
| | |
| | | */ |
| | | public class DatabaseEnvironmentMonitor extends MonitorProvider |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | | "org.opends.server.monitors.DatabaseEnvironmentMonitor"; |
| | | |
| | | |
| | | /** |
| | |
| | | { |
| | | super(name + " Monitor Provider"); |
| | | |
| | | assert debugConstructor(CLASS_NAME); |
| | | |
| | | this.name = name; |
| | | this.environment = environment; |
| | |
| | | |
| | | } catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "addAttributesForStatsObject", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | transactionStats = environment.getTransactionStats(statsConfig); |
| | | } catch (DatabaseException e) |
| | | { |
| | | assert debugException(CLASS_NAME, "getMonitorData", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | return null; |
| | | } |
| | | |