Package com.alibaba.druid.filter.stat

Examples of com.alibaba.druid.filter.stat.StatFilter


                          PropertiesContent.get("jdbc.password")
                          ,PropertiesContent.get("jdbc.driver"));
//    WallFilter wall = new WallFilter();
//    wall.setDbType(PropertiesContent.get("jdbc.dbType"));
//    druidPlugin.addFilter(wall);
    druidPlugin.addFilter(new StatFilter());
    me.add(druidPlugin);
    // 配置ActiveRecord插件
    /**
    ActiveRecordPlugin arp = new ActiveRecordPlugin(druidPlugin);
    me.add(arp);
View Full Code Here


            return conn;
        }
    }

    public CompositeDataSupport getCompositeData() throws JMException {
        StatFilter statFilter = null;
        JdbcDataSourceStat stat = null;
        for (Filter filter : this.getProxyFilters()) {
            if (filter instanceof StatFilter) {
                statFilter = (StatFilter) filter;
            }
        }
        if (statFilter != null) {
            stat = statFilter.getDataSourceStat();
        }

        Map<String, Object> map = new HashMap<String, Object>();

        map.put("ID", getID());
View Full Code Here

        return classes.toArray(new String[classes.size()]);
    }

    public CompositeDataSupport getCompositeData() throws JMException {
        StatFilter statFilter = null;
        JdbcDataSourceStat stat = null;
        for (Filter filter : this.getProxyFilters()) {
            if (filter instanceof StatFilter) {
                statFilter = (StatFilter) filter;
            }
        }
        if (statFilter != null) {
            stat = statFilter.getDataSourceStat();
        }

        Map<String, Object> map = new HashMap<String, Object>();

        map.put("ID", id);
View Full Code Here

        final ConcurrentMap<String, DataSourceProxyImpl> dataSources = DruidDriver.getProxyDataSources();
        for (DataSourceProxyImpl dataSource : dataSources.values()) {
            for (Filter filter : dataSource.getConfig().getFilters()) {
                if (filter instanceof StatFilter) {
                    StatFilter countFilter = (StatFilter) filter;

                    ConcurrentMap<Long, JdbcConnectionStat.Entry> connections = countFilter.getConnections();
                    for (Map.Entry<Long, JdbcConnectionStat.Entry> entry : connections.entrySet()) {
                        data.put(entry.getValue().getCompositeData());
                    }
                }
            }
View Full Code Here

        final ConcurrentMap<String, DataSourceProxyImpl> dataSources = DruidDriver.getProxyDataSources();
        for (DataSourceProxyImpl dataSource : dataSources.values()) {
            for (Filter filter : dataSource.getConfig().getFilters()) {
                if (filter instanceof StatFilter) {
                    StatFilter countFilter = (StatFilter) filter;
                    countFilter.reset();
                }
            }
        }
    }
View Full Code Here

        }
        return properties.toString();
    }

    public CompositeDataSupport getCompositeData() throws JMException {
        StatFilter statFilter = null;
        JdbcDataSourceStat stat = null;
        for (Filter filter : this.getProxyFilters()) {
            if (filter instanceof StatFilter) {
                statFilter = (StatFilter) filter;
            }
        }
        if (statFilter != null) {
            stat = statFilter.getDataSourceStat();
        }

        Map<String, Object> map = new HashMap<String, Object>();

        map.put("ID", id);
View Full Code Here

            return conn;
        }
    }

    public CompositeDataSupport getCompositeData() throws JMException {
        StatFilter statFilter = null;
        JdbcDataSourceStat stat = null;
        for (Filter filter : this.getProxyFilters()) {
            if (filter instanceof StatFilter) {
                statFilter = (StatFilter) filter;
            }
        }
        if (statFilter != null) {
            stat = statFilter.getDataSourceStat();
        }

        Map<String, Object> map = new HashMap<String, Object>();

        map.put("ID", getID());
View Full Code Here

        final ConcurrentMap<String, DataSourceProxyImpl> dataSources = DruidDriver.getProxyDataSources();
        for (DataSourceProxyImpl dataSource : dataSources.values()) {
            for (Filter filter : dataSource.getConfig().getFilters()) {
                if (filter instanceof StatFilter) {
                    StatFilter countFilter = (StatFilter) filter;

                    ConcurrentMap<Long, JdbcConnectionStat.Entry> connections = countFilter.getConnections();
                    for (Map.Entry<Long, JdbcConnectionStat.Entry> entry : connections.entrySet()) {
                        data.put(entry.getValue().getCompositeData());
                    }
                }
            }
        }

        for (DruidDataSource instance : DruidDataSourceStatManager.getDruidDataSourceInstances()) {
            for (Filter filter : instance.getProxyFilters()) {
                if (filter instanceof StatFilter) {
                    StatFilter countFilter = (StatFilter) filter;

                    ConcurrentMap<Long, JdbcConnectionStat.Entry> connections = countFilter.getConnections();
                    for (Map.Entry<Long, JdbcConnectionStat.Entry> entry : connections.entrySet()) {
                        data.put(entry.getValue().getCompositeData());
                    }
                }
            }
View Full Code Here

        final ConcurrentMap<String, DataSourceProxyImpl> dataSources = DruidDriver.getProxyDataSources();
        for (DataSourceProxyImpl dataSource : dataSources.values()) {
            for (Filter filter : dataSource.getConfig().getFilters()) {
                if (filter instanceof StatFilter) {
                    StatFilter countFilter = (StatFilter) filter;
                    countFilter.reset();
                }
            }
        }

        for (DruidDataSource instance : DruidDataSourceStatManager.getDruidDataSourceInstances()) {
            for (Filter filter : instance.getProxyFilters()) {
                if (filter instanceof StatFilter) {
                    StatFilter countFilter = (StatFilter) filter;
                    countFilter.reset();
                }
            }
        }
    }
View Full Code Here

        }
        return properties.toString();
    }

    public CompositeDataSupport getCompositeData() throws JMException {
        StatFilter statFilter = null;
        JdbcDataSourceStat stat = null;
        for (Filter filter : this.getProxyFilters()) {
            if (filter instanceof StatFilter) {
                statFilter = (StatFilter) filter;
            }
        }
        if (statFilter != null) {
            stat = statFilter.getDataSourceStat();
        }

        Map<String, Object> map = new HashMap<String, Object>();

        map.put("ID", id);
View Full Code Here

TOP

Related Classes of com.alibaba.druid.filter.stat.StatFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.