| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.monitors; |
| | | |
| | |
| | | import com.sleepycat.je.DatabaseException; |
| | | import com.sleepycat.je.EnvironmentStats; |
| | | import com.sleepycat.je.JEVersion; |
| | | import com.sleepycat.je.LockStats; |
| | | import com.sleepycat.je.StatsConfig; |
| | | import com.sleepycat.je.TransactionStats; |
| | | |
| | |
| | | public ArrayList<Attribute> getMonitorData() |
| | | { |
| | | EnvironmentStats environmentStats = null; |
| | | LockStats lockStats = null; |
| | | TransactionStats transactionStats = null; |
| | | StatsConfig statsConfig = new StatsConfig(); |
| | | |
| | | try |
| | | { |
| | | environmentStats = rootContainer.getEnvironmentStats(statsConfig); |
| | | lockStats = rootContainer.getEnvironmentLockStats(statsConfig); |
| | | transactionStats = |
| | | rootContainer.getEnvironmentTransactionStats(statsConfig); |
| | | } catch (DatabaseException e) |
| | |
| | | monitorAttrs.add(Attributes.create(versionType, jeVersion)); |
| | | |
| | | addAttributesForStatsObject(monitorAttrs, environmentStats, "Environment"); |
| | | addAttributesForStatsObject(monitorAttrs, lockStats, "Lock"); |
| | | addAttributesForStatsObject(monitorAttrs, transactionStats, "Transaction"); |
| | | |
| | | return monitorAttrs; |