public abstract class AbstractListHandler extends Object implements ListHandler
| 构造器和说明 |
|---|
AbstractListHandler() |
| 限定符和类型 | 方法和说明 |
|---|---|
List<SectionInfo> |
getDeleteInfos(Object account_id,
Object obj,
List<LsCacheInfoHelper> infoList)
和对象删除相关的两个方法
|
List<SectionInfo> |
getSavedInfos(Object account_id,
Object obj,
List<LsCacheInfoHelper> infoHelperList)
和对象保存相关的两个方法
|
UpdateInfo |
getUpdateInfos(Object account_id,
Object obj,
Object oldObj,
Map<String,LsCacheInfoHelper> newObjLsMap,
Map<String,LsCacheInfoHelper> oldObjLsMap)
参考 CommonListHandler --->getUpdateInfos 的说明,仅适合于非 主/从数据库分离的情况
查找因对象更新,导致的数据将发生变化的与对象相关的List,此处仅考虑对象的KeyProperty 和 orderByProperty 两个属性
场景一.
|
void |
processBatchedSave(Map<String,List<LsCacheInfoHelper>> lsMap)
批量保存时的处理逻辑:
设计理念: 判断对应的List是否在缓存中,发现即删除 ^_^ 简单粗暴,但略显复杂
|
void |
processDelete(Object account_id,
Class clazz,
Object obj,
List<SectionInfo> delInfos) |
void |
processUpdate(Object account_id,
Class clazz,
Object oldObj,
Object obj,
UpdateInfo updateInfo)
参考 CommonListHandler --->getUpdateInfos 的说明,仅适合于非 主/从数据库分离的情况
简单粗暴的更新方式,直接从缓存中删除相应的List--- 我喜欢 ^_^
场景一 : 会从缓存中删除 2 个List
场景二 : 会从缓存中删除 1 个List
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprocessSavepublic void processBatchedSave(Map<String,List<LsCacheInfoHelper>> lsMap) throws Exception
processBatchedSave 在接口中 ListHandlerExceptionpublic List<SectionInfo> getSavedInfos(Object account_id, Object obj, List<LsCacheInfoHelper> infoHelperList) throws Exception
ListHandlergetSavedInfos 在接口中 ListHandlerExceptionpublic List<SectionInfo> getDeleteInfos(Object account_id, Object obj, List<LsCacheInfoHelper> infoList) throws Exception
ListHandlergetDeleteInfos 在接口中 ListHandlerExceptionpublic void processDelete(Object account_id, Class clazz, Object obj, List<SectionInfo> delInfos) throws Exception
processDelete 在接口中 ListHandlerExceptionpublic UpdateInfo getUpdateInfos(Object account_id, Object obj, Object oldObj, Map<String,LsCacheInfoHelper> newObjLsMap, Map<String,LsCacheInfoHelper> oldObjLsMap) throws Exception
getUpdateInfos 在接口中 ListHandlerExceptionpublic void processUpdate(Object account_id, Class clazz, Object oldObj, Object obj, UpdateInfo updateInfo) throws Exception
processUpdate 在接口中 ListHandlerExceptionCopyright © 2022. All rights reserved.