Package com.sun.gjc.monitoring
Class JdbcStatsProvider
- java.lang.Object
-
- com.sun.gjc.monitoring.JdbcStatsProvider
-
@AMXMetadata(type="jdbcra-mon", group="monitoring") @ManagedObject @Description("JDBC RA Statistics") public class JdbcStatsProvider extends Object
Provides the monitoring data for JDBC RA module- Author:
- Shalini M
-
-
Constructor Summary
Constructors Constructor Description JdbcStatsProvider(String poolName, String appName, String moduleName, int sqlTraceCacheSize, long timeToKeepQueries)
JdbcStatsProvider(String poolName, String appName, String moduleName, int sqlTraceCacheSize, long timeToKeepQueries, int maxStoredEntries)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FrequentSQLTraceCache
getFreqSqlTraceCache()
Get the FrequentSQLTraceCache associated with this stats provider.org.glassfish.external.statistics.ListStatistic
getfreqUsedSqlQueries()
org.glassfish.external.statistics.CountStatistic
getNumPotentialStatementLeak()
org.glassfish.external.statistics.CountStatistic
getNumStatementCacheHit()
org.glassfish.external.statistics.CountStatistic
getNumStatementCacheMiss()
org.glassfish.external.statistics.ListStatistic
getSlowSqlQueries()
SlowSqlTraceCache
getSlowSqlTraceCache()
Get the SlowSqlTraceCache associated with this stats provider.void
potentialStatementLeakEvent(String poolName, String appName, String moduleName)
Whenever statement leak happens, increment numPotentialStatementLeak count.void
statementCacheHitEvent(String poolName, String appName, String moduleName)
Whenever statement cache is hit, increment numStatementCacheHit count.void
statementCacheMissEvent(String poolName, String appName, String moduleName)
Whenever statement cache miss happens, increment numStatementCacheMiss count.void
traceSQLEvent(String poolName, String appName, String moduleName, String sql, long executionTime)
Whenever a sql statement that is traced is to be cache for monitoring purpose, the SQLTrace object is created for the specified sql and updated in the SQLTraceCache.
-
-
-
Method Detail
-
statementCacheHitEvent
public void statementCacheHitEvent(String poolName, String appName, String moduleName)
Whenever statement cache is hit, increment numStatementCacheHit count.- Parameters:
poolName
- JdbcConnectionPool that has got a statement cache hit event.
-
statementCacheMissEvent
public void statementCacheMissEvent(String poolName, String appName, String moduleName)
Whenever statement cache miss happens, increment numStatementCacheMiss count.- Parameters:
poolName
- JdbcConnectionPool that has got a statement cache miss event.
-
traceSQLEvent
public void traceSQLEvent(String poolName, String appName, String moduleName, String sql, long executionTime)
Whenever a sql statement that is traced is to be cache for monitoring purpose, the SQLTrace object is created for the specified sql and updated in the SQLTraceCache. This is used to update the frequently used and slowest sql queries.- Parameters:
poolName
-appName
-sql
-moduleName
-executionTime
-
-
potentialStatementLeakEvent
public void potentialStatementLeakEvent(String poolName, String appName, String moduleName)
Whenever statement leak happens, increment numPotentialStatementLeak count.- Parameters:
poolName
- JdbcConnectionPool that has got a statement leak event.
-
getNumStatementCacheHit
@ManagedAttribute(id="numstatementcachehit") public org.glassfish.external.statistics.CountStatistic getNumStatementCacheHit()
-
getNumStatementCacheMiss
@ManagedAttribute(id="numstatementcachemiss") public org.glassfish.external.statistics.CountStatistic getNumStatementCacheMiss()
-
getfreqUsedSqlQueries
@ManagedAttribute(id="frequsedsqlqueries") public org.glassfish.external.statistics.ListStatistic getfreqUsedSqlQueries()
-
getSlowSqlQueries
@ManagedAttribute(id="slowSqlQueries") public org.glassfish.external.statistics.ListStatistic getSlowSqlQueries()
-
getNumPotentialStatementLeak
@ManagedAttribute(id="numpotentialstatementleak") public org.glassfish.external.statistics.CountStatistic getNumPotentialStatementLeak()
-
getFreqSqlTraceCache
public FrequentSQLTraceCache getFreqSqlTraceCache()
Get the FrequentSQLTraceCache associated with this stats provider.- Returns:
- FrequentSQLTraceCache The FrequentSQLTraceCache associated with this stats provider
-
getSlowSqlTraceCache
public SlowSqlTraceCache getSlowSqlTraceCache()
Get the SlowSqlTraceCache associated with this stats provider.- Returns:
- SlowSqlTraceCache The SlowSqlTraceCache associated with this stats provider
-
-