Class MonitorDaoJdbcImpl
java.lang.Object
com.alibaba.druid.support.monitor.dao.MonitorDaoJdbcImpl
- All Implemented Interfaces:
MonitorDao
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildInsertSql(MonitorDaoJdbcImpl.BeanInfo beanInfo) booleancacheContains(String type, Long hash) voidcreateInstance(MonitorDaoJdbcImpl.BeanInfo beanInfo) voidcreateTables(String dbType) findCluster(String domain, String app, String cluster) protected StringgetConstValueFromDb(String domain, String app, String type, Long hash) protected longgetSqlHash(String sql) getTableName(MonitorDaoJdbcImpl.BeanInfo beanInfo) voidinsertAppIfNotExits(String domain, String app) voidinsertClusterIfNotExits(String domain, String app, String cluster) voidinsertOrUpdateInstance(String domain, String app, String cluster, String host, String ip, Date startTime, long pid) listCluster(String domain, String app) loadSqlList(Map<String, Object> filters) protected voidreadFieldValue(Object object, MonitorDaoJdbcImpl.FieldInfo field, ResultSet rs, int paramIndex) voidsaveSpringMethod(MonitorContext ctx, List<SpringMethodStatValue> list) voidsaveSql(MonitorContext ctx, List<DruidDataSourceStatValue> dataSourceList) voidsaveSqlWall(MonitorContext ctx, List<WallProviderStatValue> statList) voidsaveWebApp(MonitorContext ctx, List<WebAppStatValue> list) voidsaveWebURI(MonitorContext ctx, List<WebURIStatValue> list) voidsetDataSource(DataSource dataSource) protected voidsetParameterForSqlStat(MonitorDaoJdbcImpl.BeanInfo beanInfo, MonitorContext ctx, PreparedStatement stmt, Object sqlStat)
-
Constructor Details
-
MonitorDaoJdbcImpl
public MonitorDaoJdbcImpl()
-
-
Method Details
-
createTables
-
getDataSource
-
setDataSource
-
saveSql
- Specified by:
saveSqlin interfaceMonitorDao
-
saveSpringMethod
- Specified by:
saveSpringMethodin interfaceMonitorDao
-
saveWebURI
- Specified by:
saveWebURIin interfaceMonitorDao
-
saveSqlWall
- Specified by:
saveSqlWallin interfaceMonitorDao
-
saveWebApp
- Specified by:
saveWebAppin interfaceMonitorDao
-
loadSqlList
- Specified by:
loadSqlListin interfaceMonitorDao
-
readFieldValue
protected void readFieldValue(Object object, MonitorDaoJdbcImpl.FieldInfo field, ResultSet rs, int paramIndex) throws SQLException - Throws:
SQLException
-
getConstValueFromDb
-
setParameterForSqlStat
protected void setParameterForSqlStat(MonitorDaoJdbcImpl.BeanInfo beanInfo, MonitorContext ctx, PreparedStatement stmt, Object sqlStat) throws SQLException - Throws:
SQLException
-
createInstance
-
buildInsertSql
-
getTableName
-
getSqlHash
-
cacheContains
-
cacheGet
-
cachePut
-
insertAppIfNotExits
- Specified by:
insertAppIfNotExitsin interfaceMonitorDao- Throws:
SQLException
-
listApp
- Throws:
SQLException
-
findApp
- Throws:
SQLException
-
listCluster
- Throws:
SQLException
-
insertClusterIfNotExits
- Specified by:
insertClusterIfNotExitsin interfaceMonitorDao- Throws:
SQLException
-
findCluster
- Throws:
SQLException
-
insertOrUpdateInstance
public void insertOrUpdateInstance(String domain, String app, String cluster, String host, String ip, Date startTime, long pid) throws SQLException - Specified by:
insertOrUpdateInstancein interfaceMonitorDao- Throws:
SQLException
-
findInst
public MonitorInstance findInst(String domain, String app, String cluster, String host) throws SQLException - Throws:
SQLException
-
listInst
public List<MonitorInstance> listInst(String domain, String app, String cluster) throws SQLException - Throws:
SQLException
-