public interface SessionManager extends SessionLifecycleListener, Disposable
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addBranchSession(GlobalSession globalSession,
BranchSession session)
Add branch session.
|
void |
addGlobalSession(GlobalSession session)
Add global session.
|
Collection<GlobalSession> |
allSessions()
All sessions collection.
|
GlobalSession |
findGlobalSession(String xid)
Find global session global session.
|
GlobalSession |
findGlobalSession(String xid,
boolean withBranchSessions)
Find global session global session.
|
List<GlobalSession> |
findGlobalSessions(SessionCondition condition)
Find global sessions list.
|
<T> T |
lockAndExecute(GlobalSession globalSession,
GlobalSession.LockCallable<T> lockCallable)
lock and execute
|
void |
removeBranchSession(GlobalSession globalSession,
BranchSession session)
Remove branch session.
|
void |
removeGlobalSession(GlobalSession session)
Remove global session.
|
void |
updateBranchSessionStatus(BranchSession session,
BranchStatus status)
Update branch session status.
|
void |
updateGlobalSessionStatus(GlobalSession session,
GlobalStatus status)
Update global session status.
|
onAddBranch, onBegin, onBranchStatusChange, onClose, onFailEnd, onRemoveBranch, onStatusChange, onSuccessEnddestroyvoid addGlobalSession(GlobalSession session) throws TransactionException
session - the sessionTransactionException - the transaction exceptionGlobalSession findGlobalSession(String xid)
xid - the xidGlobalSession findGlobalSession(String xid, boolean withBranchSessions)
xid - the xidwithBranchSessions - the withBranchSessionsvoid updateGlobalSessionStatus(GlobalSession session, GlobalStatus status) throws TransactionException
session - the sessionstatus - the statusTransactionException - the transaction exceptionvoid removeGlobalSession(GlobalSession session) throws TransactionException
session - the sessionTransactionException - the transaction exceptionvoid addBranchSession(GlobalSession globalSession, BranchSession session) throws TransactionException
globalSession - the global sessionsession - the sessionTransactionException - the transaction exceptionvoid updateBranchSessionStatus(BranchSession session, BranchStatus status) throws TransactionException
session - the sessionstatus - the statusTransactionException - the transaction exceptionvoid removeBranchSession(GlobalSession globalSession, BranchSession session) throws TransactionException
globalSession - the global sessionsession - the sessionTransactionException - the transaction exceptionCollection<GlobalSession> allSessions()
List<GlobalSession> findGlobalSessions(SessionCondition condition)
condition - the condition<T> T lockAndExecute(GlobalSession globalSession, GlobalSession.LockCallable<T> lockCallable) throws TransactionException
globalSession - the global sessionlockCallable - the lock CallableTransactionExceptionCopyright © 2022 Seata. All rights reserved.