WIP update/refactoring on caching

This commit is contained in:
Rob Bygrave committed 2014-04-24 01:57:52 +12:00
1 parent 2dccb818a2
commit 4c4e084e43
25 files changed
+728 -460

No files matched your search

@@ -156,7 +156,7 @@ public class DLoadBeanContext extends DLoadBaseContext implements LoadBeanContex
return;
}
if (context.hitCache && context.desc.loadFromCache(ebi)) {
if (context.hitCache && context.desc.cacheBeanLoad(ebi)) {
// successfully hit the L2 cache so don't invoke DB lazy loading
list.remove(ebi);
return;
@@ -167,7 +167,7 @@ public class DLoadBeanContext extends DLoadBaseContext implements LoadBeanContex
Iterator<EntityBeanIntercept> iterator = list.iterator();
while (iterator.hasNext()) {
EntityBeanIntercept bean = iterator.next();
if (context.desc.loadFromCache(bean)) {
if (context.desc.cacheBeanLoad(bean)) {
iterator.remove();
}
}
@@ -178,7 +178,7 @@ public class DLoadManyContext extends DLoadBaseContext implements LoadManyContex
EntityBean ownerBean = bc.getOwnerBean();
BeanDescriptor<? extends Object> parentDesc = context.desc.getBeanDescriptor(ownerBean.getClass());
Object parentId = parentDesc.getId(ownerBean);
if (parentDesc.cacheLoadMany(context.property, bc, parentId, context.parent.isReadOnly())) {
if (parentDesc.cacheManyPropLoad(context.property, bc, parentId, context.parent.isReadOnly())) {
// we loaded the bean from cache
list.remove(bc);
return;