E - 业务对象V - 值对象public class RemoteInvokerPersister<E extends AbstractRemotePersistent<?,V>,V> extends AbstractRemotePersister<E,V>
AbstractPersister.Cache| 限定符和类型 | 字段和说明 |
|---|---|
protected RemoteInvokerPersisterFactory |
m_Factory
工厂
|
protected cn.weforward.protocol.ext.ObjectMapper<E> |
m_Mapper
对象映射
|
protected cn.weforward.protocol.ext.ObjectMapper<V> |
m_VoMapper
对象映射
|
m_Expiry, m_Offline, m_RefreshTimeout, m_ShareDelayLoader_Logger, m_Cache, m_Flusher, m_ForOwnerEnabled, m_IdGenerator, m_Listeners, m_Name, m_ReloadEnabled, m_VerifyNewIdTrys| 限定符 | 构造器和说明 |
|---|---|
protected |
RemoteInvokerPersister(RemoteInvokerPersisterFactory factory,
cn.weforward.protocol.ext.ObjectMapper<E> mapper,
cn.weforward.protocol.ext.ObjectMapper<V> voMapper) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addListener(ChangeListener<E> l)
添加监听
|
static void |
checkGateWayException(cn.weforward.protocol.Response response)
检查网关异常
|
static void |
checkMicroserviceException(cn.weforward.protocol.support.datatype.FriendlyObject serviceResult)
检查微服务异常
|
protected E |
create(String id,
ObjectWithVersion<V> vo)
创建对象
|
protected String |
genMethod(String method) |
protected cn.weforward.protocol.client.ServiceInvoker |
getInvoker() |
protected boolean |
remoteDelete(String id)
从远端删除对象
|
protected ObjectWithVersion<V> |
remoteLoad(String id,
String version)
从远程装入对象
|
protected String |
remoteNew(String id,
V object)
新增的对象(用于持久器在对象未刷写前能进行查询)到远端
|
protected String |
remoteSave(String id,
V object)
保存对象状态到远端
|
void |
removeListener(ChangeListener<E> l)
移除监听
|
cn.weforward.common.ResultPage<String> |
searchOfId(Condition condition,
OrderBy orderBy)
条件查询
|
cn.weforward.common.ResultPage<String> |
searchOfId(Date begin,
Date end)
查找在指定时间段内变化(持久化)过的对象 (begin,end]
|
Iterator<String> |
searchOfId(String serverId,
Date begin,
Date end)
查找在指定时间段内变化(持久化)过的对象
|
cn.weforward.common.ResultPage<String> |
searchRangeOfId(String from,
String to)
查找ID在指定区间内的对象,id>=from and id<=to
|
Iterator<String> |
searchRangeOfId(String serverId,
String from,
String to)
查找ID在指定区间内的对象,id>=from and id<=to
|
cn.weforward.common.ResultPage<String> |
startsWithOfId(String prefix)
查找ID为指定前缀的对象
|
getExpiry, innerDelete, innerLoad, innerNew, innerSave, isShareDelayLoader, remoteLoad, remoteNew, remoteSave, setExpiry, setRefreshTimeout, setShareDelayLoader, updateOfflinecleanup, equals, flush, get, get, getCache, getFlusher, getIdGenerator, getName, getNewId, getNewId, getOfCache, getPersisterId, getVerifyNewIdTrys, getVersion, hold, innerSave, isDirty, isForOwnerEnabled, isOwner, isReloadEnabled, persist, persist, putOfCache, remove, remove, removeOfCache, search, search, search, search, searchOfId, searchRange, searchRange, setFlusher, setForOwnerEnabled, setPersisterId, setReachable, setReloadEnabled, setVerifyNewIdTrys, startsWith, toString, updateprotected RemoteInvokerPersisterFactory m_Factory
protected cn.weforward.protocol.ext.ObjectMapper<E extends AbstractRemotePersistent<?,V>> m_Mapper
protected cn.weforward.protocol.ext.ObjectMapper<V> m_VoMapper
protected RemoteInvokerPersister(RemoteInvokerPersisterFactory factory, cn.weforward.protocol.ext.ObjectMapper<E> mapper, cn.weforward.protocol.ext.ObjectMapper<V> voMapper)
protected cn.weforward.protocol.client.ServiceInvoker getInvoker()
public cn.weforward.common.ResultPage<String> startsWithOfId(String prefix)
Persisterprefix - ID前缀public cn.weforward.common.ResultPage<String> searchOfId(Date begin, Date end)
Persisterbegin - 开始时间,若=null则不限制开始时间end - 结束时间,若=null则为当前时间public cn.weforward.common.ResultPage<String> searchRangeOfId(String from, String to)
Persisterfrom - ID开始点,若为null则不限制开始(但to不能为null)to - ID结束点,若为null则不限制结束(但from不能为null)public Iterator<String> searchOfId(String serverId, Date begin, Date end)
PersisterserverId - 服务器标识(1~255)begin - 开始时间,若=null则不限制开始时间end - 结束时间,若=null则为当前时间public Iterator<String> searchRangeOfId(String serverId, String from, String to)
PersisterserverId - 服务器标识from - ID开始点,若为null则不限制开始(但to不能为null)to - ID结束点,若为null则不限制结束(但from不能为null)protected E create(String id, ObjectWithVersion<V> vo)
AbstractRemotePersistercreate 在类中 AbstractRemotePersister<E extends AbstractRemotePersistent<?,V>,V>id - 对象idvo - 对象VOpublic static void checkGateWayException(cn.weforward.protocol.Response response)
throws DataAccessException
response - 响应DataAccessException - 数据异常public static void checkMicroserviceException(cn.weforward.protocol.support.datatype.FriendlyObject serviceResult)
throws DataAccessException
serviceResult - 结果DataAccessException - 据异常protected String remoteNew(String id, V object)
AbstractRemotePersisterremoteNew 在类中 AbstractRemotePersister<E extends AbstractRemotePersistent<?,V>,V>id - 对象idobject - 对象值voprotected ObjectWithVersion<V> remoteLoad(String id, String version)
AbstractRemotePersisterremoteLoad 在类中 AbstractRemotePersister<E extends AbstractRemotePersistent<?,V>,V>id - 对象IDversion - 当前对象的版本号,为null则表示未知,如果不为null且与远端版本一样可返回无修改提高性能protected String remoteSave(String id, V object)
AbstractRemotePersisterremoteSave 在类中 AbstractRemotePersister<E extends AbstractRemotePersistent<?,V>,V>id - 对象idobject - 对象值voprotected boolean remoteDelete(String id)
AbstractRemotePersisterremoteDelete 在类中 AbstractRemotePersister<E extends AbstractRemotePersistent<?,V>,V>id - 对象IDpublic void addListener(ChangeListener<E> l)
PersisteraddListener 在接口中 Persister<E extends AbstractRemotePersistent<?,V>>addListener 在类中 AbstractPersister<E extends AbstractRemotePersistent<?,V>>l - 监听对象public void removeListener(ChangeListener<E> l)
PersisterremoveListener 在接口中 Persister<E extends AbstractRemotePersistent<?,V>>removeListener 在类中 AbstractPersister<E extends AbstractRemotePersistent<?,V>>l - 监听对象public cn.weforward.common.ResultPage<String> searchOfId(Condition condition, OrderBy orderBy)
Persistercondition - 条件 ConditionUtilorderBy - 排序 OrderByUtilCopyright © 2021. All rights reserved.