int size=0;
for(int i=0;i<pools.length;i++)size+=pools[i].size();
return size;
}
private void removeOldest(PageSourcePool[] pools) {
PageSourcePool pool=null;
Object key=null;
PageSource ps=null;
long date=-1;
for(int i=0;i<pools.length;i++) {
try {
Object[] keys=pools[i].keys();
for(int y=0;y<keys.length;y++) {
ps = pools[i].getPageSource(keys[y],false);
if(date==-1 || date>ps.getLastAccessTime()) {
pool=pools[i];
key=keys[y];
date=ps.getLastAccessTime();
}
}
}
catch(Throwable t) {
pools[i].clear();
}
}
if(pool!=null)pool.remove(key);
}