fixed disabling of gbc for DBBean
This commit is contained in:
parent
d08bf8107f
commit
da54bc8db5
2 changed files with 6 additions and 4 deletions
BIN
Zutil.jar
BIN
Zutil.jar
Binary file not shown.
|
|
@ -47,6 +47,10 @@ public class DBBeanSQLResultHandler<T> implements SQLResultHandler<T>{
|
|||
new ConcurrentHashMap<Class<?>, Map<Long,DBBeanCache>>();
|
||||
private static Timer timer;
|
||||
|
||||
static {
|
||||
enableBeanGBC(true); // Initiate DBBeanGarbageCollector
|
||||
}
|
||||
|
||||
/**
|
||||
* A cache container that contains a object and last read time
|
||||
*/
|
||||
|
|
@ -114,13 +118,11 @@ public class DBBeanSQLResultHandler<T> implements SQLResultHandler<T>{
|
|||
this.list = list;
|
||||
this.db = db;
|
||||
this.bean_config = DBBeanConfig.getBeanConfig( cl );
|
||||
|
||||
// Initiate DBBeanGarbageCollector
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This function cancels the internal cache garbage collector in DBBean
|
||||
* This function cancels the internal cache garbage collector in DBBean.
|
||||
* GBC is enabled by default
|
||||
*/
|
||||
public static void enableBeanGBC(boolean enable){
|
||||
if(enable){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue