public class TransactionDaoImpl extends org.springframework.jdbc.core.support.JdbcDaoSupport implements ITransactionDao
| 构造器和说明 |
|---|
TransactionDaoImpl() |
| 限定符和类型 | 方法和说明 |
|---|---|
List<TGlobalTransaction> |
findFailedGlobals()
查询所有失败,或者部分回滚的全局事务记录
|
List<TGlobalTransactionProcess> |
findFailedProcess(Integer transactionId)
查找所有的失败的或者未知的事务过程记录
升序
|
List<TGlobalTransactionProcess> |
findSucceedProcess(Integer transactionId)
查找所有的成功的或者未知的事务过程记录
|
List<TGlobalTransaction> |
findSuccessWithFailedProcessGlobals()
查找所有状态为成功,但子过程中有失败的全局事务记录
|
TGlobalTransaction |
getGlobalByIdForUpdate(Integer id) |
TGlobalTransactionProcess |
getProcessByIdForUpdate(Integer id) |
Integer |
insert(TGlobalTransaction g)
插入记录,返回id
|
Integer |
insert(TGlobalTransactionProcess gp)
插入子事务过程记录,返回id
|
void |
updateGlobalTransactionStatusAndCurrSeq(Integer status,
Integer currSequence,
Integer id)
update global_transactions
set
status = ${status.getValue},
curr_sequence = ${currSequence},
updated_at = ${updatedAt}
where id = ${transactionId}
|
void |
updateProcess(Integer id,
Integer status,
String response)
update global_transaction_process
set
status = ${status.getValue},
response_json = ${responseJson},
updated_at = ${updatedAt}
where id = ${processId}
|
void |
updateProcessExpectedStatus(Integer id,
Integer expectedStatus)
更新事务过程的期望状态
|
void |
updateProcessRollbackTime(Integer id,
Integer redoTimes,
Date nextRedoTime)
更新重试次数和下次重试时间
|
public Integer insert(TGlobalTransaction g)
insert 在接口中 ITransactionDaog - public Integer insert(TGlobalTransactionProcess gp)
insert 在接口中 ITransactionDaogp - public TGlobalTransaction getGlobalByIdForUpdate(Integer id)
getGlobalByIdForUpdate 在接口中 ITransactionDaopublic TGlobalTransactionProcess getProcessByIdForUpdate(Integer id)
getProcessByIdForUpdate 在接口中 ITransactionDaopublic List<TGlobalTransactionProcess> findFailedProcess(Integer transactionId)
findFailedProcess 在接口中 ITransactionDaotransactionId - public List<TGlobalTransactionProcess> findSucceedProcess(Integer transactionId)
findSucceedProcess 在接口中 ITransactionDaotransactionId - public List<TGlobalTransaction> findFailedGlobals()
findFailedGlobals 在接口中 ITransactionDaopublic List<TGlobalTransaction> findSuccessWithFailedProcessGlobals()
findSuccessWithFailedProcessGlobals 在接口中 ITransactionDaopublic void updateProcessRollbackTime(Integer id, Integer redoTimes, Date nextRedoTime)
ITransactionDaoupdateProcessRollbackTime 在接口中 ITransactionDaopublic void updateGlobalTransactionStatusAndCurrSeq(Integer status, Integer currSequence, Integer id)
public void updateProcess(Integer id, Integer status, String response)
updateProcess 在接口中 ITransactionDaoid - status - response - public void updateProcessExpectedStatus(Integer id, Integer expectedStatus)
updateProcessExpectedStatus 在接口中 ITransactionDaoid - expectedStatus - Copyright © 2020. All rights reserved.