Class DruidStatManagerFacade


  • public final class DruidStatManagerFacade
    extends Object
    监控相关的对外数据暴露

    1. 为了支持jndi数据源本类内部调用druid相关对象均需要反射调用,返回值也应该是Object,List<Object>,Map<String,Object>等无关于druid的类型 2. 对外暴露的public方法都应该先调用init(),应该有更好的方式,暂时没想到

    Author:
    sandzhang[sandzhangtoo@gmail.com]
    • Method Detail

      • getDruidDataSourceByName

        public Object getDruidDataSourceByName​(String name)
      • resetDataSourceStat

        public void resetDataSourceStat()
      • resetSqlStat

        public void resetSqlStat()
      • resetAll

        public void resetAll()
      • logAndResetDataSource

        public void logAndResetDataSource()
      • isResetEnable

        public boolean isResetEnable()
      • setResetEnable

        public void setResetEnable​(boolean resetEnable)
      • getDruidDataSourceById

        public Object getDruidDataSourceById​(Integer identity)
      • mergWallStat

        public static Map mergWallStat​(Map mapA,
                                       Map mapB)
        Deprecated.
        Merges two wall stat maps into a single map.
        Parameters:
        mapA - the first wall stat map to be merged
        mapB - the second wall stat map to be merged
        Returns:
        a new map that contains the merged wall stats from mapA and mapB
      • mergeWallStat

        public static Map mergeWallStat​(Map mapA,
                                        Map mapB)
      • getDataSourceStatDataList

        public List<Map<String,​Object>> getDataSourceStatDataList​(boolean includeSqlList)
      • getActiveConnStackTraceList

        public List<List<String>> getActiveConnStackTraceList()
      • getResetCount

        public long getResetCount()
      • getPoolingConnectionInfoByDataSourceId

        public List<Map<String,​Object>> getPoolingConnectionInfoByDataSourceId​(Integer id)
      • getActiveConnectionStackTraceByDataSourceId

        public List<String> getActiveConnectionStackTraceByDataSourceId​(Integer id)