Package com.alibaba.druid.wall

Examples of com.alibaba.druid.wall.WallProviderStatValue


        Assert.assertEquals(2, provider.getSqlList().size());

        Assert.assertFalse(provider.checkValid("slelc"));
       
        {
            WallProviderStatValue statValue = provider.getStatValue(true);
            Assert.assertNotNull(statValue);
           
            Assert.assertEquals(2, statValue.getTables().size());
            Assert.assertEquals(1, statValue.getFunctions().size());
           
            Assert.assertEquals(1009, statValue.getCheckCount());
            Assert.assertEquals(2, statValue.getBlackListHitCount());
            Assert.assertEquals(4, statValue.getHardCheckCount());
            Assert.assertEquals(1, statValue.getSyntaxErrorCount());
            Assert.assertEquals(5, statValue.getViolationCount());
            Assert.assertEquals(1003, statValue.getWhiteListHitCount());
           
            Assert.assertEquals(1, statValue.getWhiteList().size());
            Assert.assertEquals(2, statValue.getBlackList().size());
        }
       
        {
            WallProviderStatValue statValue = provider.getStatValue(true);
            Assert.assertNotNull(statValue);
           
            Assert.assertEquals(0, statValue.getTables().size());
            Assert.assertEquals(0, statValue.getFunctions().size());
           
            Assert.assertEquals(0, statValue.getCheckCount());
            Assert.assertEquals(0, statValue.getBlackListHitCount());
            Assert.assertEquals(0, statValue.getHardCheckCount());
            Assert.assertEquals(0, statValue.getSyntaxErrorCount());
            Assert.assertEquals(0, statValue.getViolationCount());
            Assert.assertEquals(0, statValue.getWhiteListHitCount());
           
            Assert.assertEquals(0, statValue.getWhiteList().size());
            Assert.assertEquals(0, statValue.getBlackList().size());
        }
    }
View Full Code Here


                DruidDataSourceStatValue statValue = dataSource.getStatValueAndReset();
                statValueList.add(statValue);
            }

            if (collectSqlWallEnable) {
                WallProviderStatValue wallStatValue = dataSource.getWallStatValue(true);
                if (wallStatValue != null && wallStatValue.getCheckCount() > 0) {
                    wallStatValueList.add(wallStatValue);
                }
            }
        }
View Full Code Here

    public Map<String, JdbcSqlStat> getSqlStatMap() {
        return this.getDataSourceStat().getSqlStatMap();
    }

    public Map<String, Object> getWallStatMap() {
        WallProviderStatValue wallStatValue = getWallStatValue(false);

        if (wallStatValue != null) {
            return wallStatValue.toMap();
        }

        return null;
    }
View Full Code Here

TOP

Related Classes of com.alibaba.druid.wall.WallProviderStatValue

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.