public class SessionHelper extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
endCommitFailed(GlobalSession globalSession,
boolean retryGlobal)
End commit failed.
|
static void |
endCommitted(GlobalSession globalSession,
boolean retryGlobal)
End committed.
|
static void |
endRollbacked(GlobalSession globalSession,
boolean retryGlobal)
End rollbacked.
|
static void |
endRollbackFailed(GlobalSession globalSession,
boolean retryGlobal)
End rollback failed.
|
static Boolean |
forEach(Collection<BranchSession> sessions,
BranchSessionHandler handler)
Foreach branch sessions.
|
static void |
forEach(Collection<GlobalSession> sessions,
GlobalSessionHandler handler)
Foreach global sessions.
|
static BranchSession |
newBranch(BranchType branchType,
String xid,
long branchId,
String resourceId,
String applicationData)
New branch
|
static BranchSession |
newBranchByGlobal(GlobalSession globalSession,
BranchType branchType,
String resourceId,
String lockKeys,
String clientId) |
static BranchSession |
newBranchByGlobal(GlobalSession globalSession,
BranchType branchType,
String resourceId,
String applicationData,
String lockKeys,
String clientId)
New branch by global branch session.
|
static void |
removeAllBranch(GlobalSession globalSession,
boolean isAsync)
remove branchSession from globalSession
|
static void |
removeBranch(GlobalSession globalSession,
BranchSession branchSession,
boolean isAsync)
remove branchSession from globalSession
|
public static BranchSession newBranchByGlobal(GlobalSession globalSession, BranchType branchType, String resourceId, String lockKeys, String clientId)
public static BranchSession newBranchByGlobal(GlobalSession globalSession, BranchType branchType, String resourceId, String applicationData, String lockKeys, String clientId)
globalSession - the global sessionbranchType - the branch typeresourceId - the resource idlockKeys - the lock keysclientId - the client idpublic static BranchSession newBranch(BranchType branchType, String xid, long branchId, String resourceId, String applicationData)
branchType - the branch typexid - Transaction id.branchId - Branch id.resourceId - Resource id.applicationData - Application data bind with this branch.public static void endCommitted(GlobalSession globalSession, boolean retryGlobal) throws TransactionException
globalSession - the global sessionretryGlobal - the retry globalTransactionException - the transaction exceptionpublic static void endCommitFailed(GlobalSession globalSession, boolean retryGlobal) throws TransactionException
globalSession - the global sessionretryGlobal - the retry globalTransactionException - the transaction exceptionpublic static void endRollbacked(GlobalSession globalSession, boolean retryGlobal) throws TransactionException
globalSession - the global sessionretryGlobal - the retry globalTransactionException - the transaction exceptionpublic static void endRollbackFailed(GlobalSession globalSession, boolean retryGlobal) throws TransactionException
globalSession - the global sessionretryGlobal - the retry globalTransactionException - the transaction exceptionpublic static void forEach(Collection<GlobalSession> sessions, GlobalSessionHandler handler)
sessions - the global sessionshandler - the handlerpublic static Boolean forEach(Collection<BranchSession> sessions, BranchSessionHandler handler) throws TransactionException
sessions - the branch sessionhandler - the handlerTransactionExceptionpublic static void removeBranch(GlobalSession globalSession, BranchSession branchSession, boolean isAsync) throws TransactionException
globalSession - the globalSessionbranchSession - the branchSessionisAsync - if asynchronous removeTransactionExceptionpublic static void removeAllBranch(GlobalSession globalSession, boolean isAsync) throws TransactionException
globalSession - the globalSessionisAsync - if asynchronous removeTransactionExceptionCopyright © 2022 Seata. All rights reserved.