public interface TCGlobalContext
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addTxcLockId(String groupId,
String unitId,
Set<String> lockIdSet)
txc type lock
|
void |
clearGroup(String groupId)
clean group
|
void |
destroyTx()
del tx info
|
void |
destroyTx(String groupId)
del tx info
|
int |
dtxState(String groupId)
判断某个事务是否不允许提交
|
Set<String> |
findTxcLockSet(String groupId,
String unitId)
find txc lock set
|
LcnConnectionProxy |
getLcnConnection(String groupId)
get lcn proxy
|
boolean |
hasTxContext()
has tx context
|
boolean |
isDTXTimeout()
is time out
|
void |
setLcnConnection(String groupId,
LcnConnectionProxy connectionProxy)
set lcn connection
|
void |
setRollbackOnly(String groupId)
设置某个事务组不允许提交
|
TxContext |
startTx()
start tx
|
TableStruct |
tableStruct(String table,
com.codingapi.txlcn.common.util.function.Supplier<TableStruct,SQLException> structSupplier)
table struct info
|
TccTransactionInfo |
tccTransactionInfo(String unitId,
com.codingapi.txlcn.common.util.function.Supplier<TccTransactionInfo,com.codingapi.txlcn.common.exception.TransactionException> supplier)
get tcc info
|
TxContext |
txContext()
get context info
|
TxContext |
txContext(String groupId)
get tx context info by groupId
|
void setLcnConnection(String groupId, LcnConnectionProxy connectionProxy)
groupId - groupIdconnectionProxy - connectionProxyLcnConnectionProxy getLcnConnection(String groupId) throws com.codingapi.txlcn.common.exception.TCGlobalContextException
groupId - groupIdcom.codingapi.txlcn.common.exception.TCGlobalContextException - TCGlobalContextExceptionTccTransactionInfo tccTransactionInfo(String unitId, com.codingapi.txlcn.common.util.function.Supplier<TccTransactionInfo,com.codingapi.txlcn.common.exception.TransactionException> supplier) throws com.codingapi.txlcn.common.exception.TransactionException
unitId - unitIdsupplier - suppliercom.codingapi.txlcn.common.exception.TransactionException - TransactionExceptionvoid addTxcLockId(String groupId, String unitId, Set<String> lockIdSet)
groupId - groupIdunitId - unitIdlockIdSet - lockIdSetSet<String> findTxcLockSet(String groupId, String unitId) throws com.codingapi.txlcn.common.exception.TCGlobalContextException
groupId - groupIdunitId - unitIdcom.codingapi.txlcn.common.exception.TCGlobalContextException - TCGlobalContextExceptionTableStruct tableStruct(String table, com.codingapi.txlcn.common.util.function.Supplier<TableStruct,SQLException> structSupplier) throws SQLException
table - tablestructSupplier - structSupplierSQLException - SQLExceptionvoid clearGroup(String groupId)
groupId - groupIdTxContext startTx()
TxContext txContext(String groupId)
groupId - groupIdTxContext txContext()
void destroyTx()
void destroyTx(String groupId)
groupId - groupIdboolean hasTxContext()
boolean isDTXTimeout()
int dtxState(String groupId)
groupId - groupIdvoid setRollbackOnly(String groupId)
groupId - groupIdCopyright © 2019. All rights reserved.