|
|
@ -15,24 +15,6 @@ |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
package com.fr.third.alibaba.druid.support.monitor.dao; |
|
|
|
package com.fr.third.alibaba.druid.support.monitor.dao; |
|
|
|
|
|
|
|
|
|
|
|
import java.lang.reflect.Field; |
|
|
|
|
|
|
|
import java.sql.Connection; |
|
|
|
|
|
|
|
import java.sql.PreparedStatement; |
|
|
|
|
|
|
|
import java.sql.ResultSet; |
|
|
|
|
|
|
|
import java.sql.SQLException; |
|
|
|
|
|
|
|
import java.sql.Timestamp; |
|
|
|
|
|
|
|
import java.sql.Types; |
|
|
|
|
|
|
|
import java.text.ParseException; |
|
|
|
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
|
import java.util.Date; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
import java.util.concurrent.ConcurrentHashMap; |
|
|
|
|
|
|
|
import java.util.concurrent.ConcurrentMap; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.sql.DataSource; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fr.third.alibaba.druid.DruidRuntimeException; |
|
|
|
import com.fr.third.alibaba.druid.DruidRuntimeException; |
|
|
|
import com.fr.third.alibaba.druid.pool.DruidDataSourceStatValue; |
|
|
|
import com.fr.third.alibaba.druid.pool.DruidDataSourceStatValue; |
|
|
|
import com.fr.third.alibaba.druid.stat.JdbcSqlStatValue; |
|
|
|
import com.fr.third.alibaba.druid.stat.JdbcSqlStatValue; |
|
|
@ -47,7 +29,6 @@ import com.fr.third.alibaba.druid.support.monitor.annotation.MTable; |
|
|
|
import com.fr.third.alibaba.druid.support.monitor.entity.MonitorApp; |
|
|
|
import com.fr.third.alibaba.druid.support.monitor.entity.MonitorApp; |
|
|
|
import com.fr.third.alibaba.druid.support.monitor.entity.MonitorCluster; |
|
|
|
import com.fr.third.alibaba.druid.support.monitor.entity.MonitorCluster; |
|
|
|
import com.fr.third.alibaba.druid.support.monitor.entity.MonitorInstance; |
|
|
|
import com.fr.third.alibaba.druid.support.monitor.entity.MonitorInstance; |
|
|
|
import com.fr.third.alibaba.druid.support.spring.stat.SpringMethodStatValue; |
|
|
|
|
|
|
|
import com.fr.third.alibaba.druid.util.JdbcUtils; |
|
|
|
import com.fr.third.alibaba.druid.util.JdbcUtils; |
|
|
|
import com.fr.third.alibaba.druid.util.StringUtils; |
|
|
|
import com.fr.third.alibaba.druid.util.StringUtils; |
|
|
|
import com.fr.third.alibaba.druid.util.Utils; |
|
|
|
import com.fr.third.alibaba.druid.util.Utils; |
|
|
@ -56,6 +37,23 @@ import com.fr.third.alibaba.druid.wall.WallProviderStatValue; |
|
|
|
import com.fr.third.alibaba.druid.wall.WallSqlStatValue; |
|
|
|
import com.fr.third.alibaba.druid.wall.WallSqlStatValue; |
|
|
|
import com.fr.third.alibaba.druid.wall.WallTableStatValue; |
|
|
|
import com.fr.third.alibaba.druid.wall.WallTableStatValue; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.sql.DataSource; |
|
|
|
|
|
|
|
import java.lang.reflect.Field; |
|
|
|
|
|
|
|
import java.sql.Connection; |
|
|
|
|
|
|
|
import java.sql.PreparedStatement; |
|
|
|
|
|
|
|
import java.sql.ResultSet; |
|
|
|
|
|
|
|
import java.sql.SQLException; |
|
|
|
|
|
|
|
import java.sql.Timestamp; |
|
|
|
|
|
|
|
import java.sql.Types; |
|
|
|
|
|
|
|
import java.text.ParseException; |
|
|
|
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
|
import java.util.Date; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
import java.util.concurrent.ConcurrentHashMap; |
|
|
|
|
|
|
|
import java.util.concurrent.ConcurrentMap; |
|
|
|
|
|
|
|
|
|
|
|
public class MonitorDaoJdbcImpl implements MonitorDao { |
|
|
|
public class MonitorDaoJdbcImpl implements MonitorDao { |
|
|
|
|
|
|
|
|
|
|
|
private final static Log LOG = LogFactory.getLog(MonitorDaoJdbcImpl.class); |
|
|
|
private final static Log LOG = LogFactory.getLog(MonitorDaoJdbcImpl.class); |
|
|
@ -66,8 +64,6 @@ public class MonitorDaoJdbcImpl implements MonitorDao { |
|
|
|
DruidDataSourceStatValue.class); |
|
|
|
DruidDataSourceStatValue.class); |
|
|
|
private BeanInfo sqlStatBeanInfo = new BeanInfo( |
|
|
|
private BeanInfo sqlStatBeanInfo = new BeanInfo( |
|
|
|
JdbcSqlStatValue.class); |
|
|
|
JdbcSqlStatValue.class); |
|
|
|
private BeanInfo springMethodStatBeanInfo = new BeanInfo( |
|
|
|
|
|
|
|
SpringMethodStatValue.class); |
|
|
|
|
|
|
|
private BeanInfo webURIStatBeanInfo = new BeanInfo( |
|
|
|
private BeanInfo webURIStatBeanInfo = new BeanInfo( |
|
|
|
WebURIStatValue.class); |
|
|
|
WebURIStatValue.class); |
|
|
|
private BeanInfo webAppStatBeanInfo = new BeanInfo( |
|
|
|
private BeanInfo webAppStatBeanInfo = new BeanInfo( |
|
|
@ -127,12 +123,7 @@ public class MonitorDaoJdbcImpl implements MonitorDao { |
|
|
|
save(sqlStatBeanInfo, ctx, sqlList); |
|
|
|
save(sqlStatBeanInfo, ctx, sqlList); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void saveSpringMethod(MonitorContext ctx, List<SpringMethodStatValue> list) { |
|
|
|
|
|
|
|
save(springMethodStatBeanInfo, ctx, list); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void saveWebURI(MonitorContext ctx, List<WebURIStatValue> list) { |
|
|
|
public void saveWebURI(MonitorContext ctx, List<WebURIStatValue> list) { |
|
|
|
save(webURIStatBeanInfo, ctx, list); |
|
|
|
save(webURIStatBeanInfo, ctx, list); |
|
|
|