public abstract class AbstractRemotePersistent<E extends BusinessDi,V> extends AbstractPersistent<E>
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
AbstractRemotePersistent.DelayLoader
脱机对象的延迟加载器
|
protected class |
AbstractRemotePersistent.IsolateDelayLoader
独立的加载器
|
static class |
AbstractRemotePersistent.ShareDelayLoader
共用的加载器
|
| 限定符和类型 | 字段和说明 |
|---|---|
protected static org.slf4j.Logger |
_Logger
日志记录器
|
protected AbstractRemotePersistent.DelayLoader |
m_DelayLoader
延迟加载器
|
protected long |
m_Timestamp
VO最后刷新的时间戳(毫秒)
|
protected String |
m_Version
版本
|
protected V |
m_Vo
值vo
|
protected static int |
POLICY_ASYNC
缓存刷新策略- 异步
|
protected static int |
POLICY_DEFAULT
默认缓存刷新策略
|
protected static int |
POLICY_FORCE_EXPIRED
缓存刷新策略- 标记为强过期(必须重新加载VO)
|
protected static int |
POLICY_WAITTING
缓存刷新策略- 等待
|
protected static int |
POLICY_WEAK_EXPIRED
缓存刷新策略- 标记为弱过期(若加载失败重用旧VO)
|
protected static int |
TIMEOUT_DEFAULT
等待超时值- 默认(死等)
|
protected static int |
TIMESTAMP_EXPIRED
用时间戳标记VO缓存已过期
|
protected static int |
TIMESTAMP_WEAK_EXPIRED
用时间戳标记VO缓存已弱过期
|
m_DriveIt, m_Id, PERSISTENCE_CLEAR, PERSISTENCE_DELETE, PERSISTENCE_NEW, PERSISTENCE_REINDEX, PERSISTENCE_TRANSIENT| 限定符 | 构造器和说明 |
|---|---|
protected |
AbstractRemotePersistent(E di)
以依赖接口构造对象
|
protected |
AbstractRemotePersistent(E di,
boolean persistent)
以依赖接口构造对象,且指定是否持久
|
| 限定符和类型 | 方法和说明 |
|---|---|
V |
acceptVo()
获取vo
|
protected boolean |
checkExpiry()
检查VO缓存是否过期,且根据di的配置值触发软刷新(异步刷新)
|
void |
expirePersistent()
标记为过期
|
protected AbstractRemotePersistent.DelayLoader |
getDelayLoader()
获取加载器
|
protected V |
getVo()
取得VO(可能会阻塞及触发异步刷新处理)
|
protected V |
getVoFast()
只是简单直接返回VO
|
void |
refreshPersistent(int policy)
刷新持久
|
void |
updateVo(V vo,
String version)
更新vo
|
void |
weakExpirePersistent()
标记为弱过期
|
enablDelete, enablePersistent, genPersistenceId, genPersistenceId, getBusinessDi, getDriveIt, getPersistenceId, getPersistenceVersion, getPersister, iDo, isPersistenceMark, isPersistenceOfOwner, isPersistenceUpdating, isPersistent, markPersistenceUpdate, markPersistenceUpdate, onAfterPersistence, onAfterReflect, onBeforePersistence, onDriveIt, persistenceUpdateNow, setPersistenceMark, tryDriveIt, withPersistenceIdprotected static final org.slf4j.Logger _Logger
protected static final int POLICY_FORCE_EXPIRED
protected static final int POLICY_ASYNC
protected static final int POLICY_WAITTING
protected static final int POLICY_WEAK_EXPIRED
protected static final int POLICY_DEFAULT
protected static final int TIMEOUT_DEFAULT
protected static final int TIMESTAMP_EXPIRED
protected static final int TIMESTAMP_WEAK_EXPIRED
protected V m_Vo
protected String m_Version
protected volatile long m_Timestamp
protected AbstractRemotePersistent.DelayLoader m_DelayLoader
protected AbstractRemotePersistent(E di)
di - 依赖接口protected AbstractRemotePersistent(E di, boolean persistent)
di - 依赖接口persistent - 是否持久protected V getVo()
protected V getVoFast()
protected boolean checkExpiry()
protected AbstractRemotePersistent.DelayLoader getDelayLoader()
public void refreshPersistent(int policy)
throws InterruptedException,
IOException
policy - 刷新策略 POLICY_XXXInterruptedException - 中断异常IOException - IO异常public void expirePersistent()
public void weakExpirePersistent()
public V acceptVo()
Copyright © 2021. All rights reserved.