improve WallFilter

This commit is contained in:
wenshao
2013-03-18 21:28:35 +08:00
parent 0163cb488a
commit 434b11695a
12 changed files with 227 additions and 233 deletions
@@ -20,11 +20,16 @@ public class WallContext {
private final static ThreadLocal<WallContext> contextLocal = new ThreadLocal<WallContext>();
private WallSqlStat sqlState;
private final String dbType;
public static WallContext createIfNotExists() {
public WallContext(String dbType){
this.dbType = dbType;
}
public static WallContext createIfNotExists(String dbType) {
WallContext context = contextLocal.get();
if (context == null) {
context = new WallContext();
context = new WallContext(dbType);
contextLocal.set(context);
}
return context;
@@ -46,4 +51,8 @@ public class WallContext {
this.sqlState = sqlState;
}
public String getDbType() {
return dbType;
}
}