public class BranchSession extends Object implements Lockable, Comparable<BranchSession>, SessionStorable
| 构造器和说明 |
|---|
BranchSession() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
canBeCommittedAsync() |
int |
compareTo(BranchSession o) |
void |
decode(byte[] a)
Decode.
|
byte[] |
encode()
Encode byte [ ].
|
String |
getApplicationData()
Gets application data.
|
long |
getBranchId()
Gets branch id.
|
BranchType |
getBranchType()
Gets branch type.
|
String |
getClientId()
Gets client id.
|
ConcurrentMap<FileLocker.BucketLockMap,Set<String>> |
getLockHolder()
Gets lock holder.
|
String |
getLockKey()
Gets lock key.
|
LockStatus |
getLockStatus() |
String |
getResourceGroupId()
Gets resource group id.
|
String |
getResourceId()
Gets resource id.
|
BranchStatus |
getStatus()
Gets status.
|
long |
getTransactionId()
Gets transaction id.
|
String |
getXid()
Gets xid.
|
boolean |
lock()
Lock boolean.
|
boolean |
lock(boolean autoCommit,
boolean skipCheckLock) |
void |
setApplicationData(String applicationData)
Sets application data.
|
void |
setBranchId(long branchId)
Sets branch id.
|
void |
setBranchType(BranchType branchType)
Sets branch type.
|
void |
setClientId(String clientId)
Sets client id.
|
void |
setLockKey(String lockKey)
Sets lock key.
|
void |
setLockStatus(LockStatus lockStatus) |
void |
setResourceGroupId(String resourceGroupId)
Sets resource group id.
|
void |
setResourceId(String resourceId)
Sets resource id.
|
void |
setStatus(BranchStatus status)
Sets status.
|
void |
setTransactionId(long transactionId)
Sets transaction id.
|
void |
setXid(String xid)
Sets xid.
|
String |
toString() |
boolean |
unlock()
Unlock boolean.
|
public String getApplicationData()
public void setApplicationData(String applicationData)
applicationData - the application datapublic String getResourceGroupId()
public void setResourceGroupId(String resourceGroupId)
resourceGroupId - the resource group idpublic String getClientId()
public void setClientId(String clientId)
clientId - the client idpublic String getResourceId()
public void setResourceId(String resourceId)
resourceId - the resource idpublic String getLockKey()
public void setLockKey(String lockKey)
lockKey - the lock keypublic BranchType getBranchType()
public void setBranchType(BranchType branchType)
branchType - the branch typepublic BranchStatus getStatus()
public void setStatus(BranchStatus status)
status - the statuspublic long getTransactionId()
public void setTransactionId(long transactionId)
transactionId - the transaction idpublic long getBranchId()
public void setBranchId(long branchId)
branchId - the branch idpublic String getXid()
public void setXid(String xid)
xid - the xidpublic int compareTo(BranchSession o)
compareTo 在接口中 Comparable<BranchSession>public boolean canBeCommittedAsync()
public ConcurrentMap<FileLocker.BucketLockMap,Set<String>> getLockHolder()
public boolean lock()
throws TransactionException
Lockablelock 在接口中 LockableTransactionException - the transaction exceptionpublic boolean lock(boolean autoCommit,
boolean skipCheckLock)
throws TransactionException
public boolean unlock()
throws TransactionException
Lockableunlock 在接口中 LockableTransactionException - the transaction exceptionpublic LockStatus getLockStatus()
public void setLockStatus(LockStatus lockStatus)
public byte[] encode()
SessionStorableencode 在接口中 SessionStorablepublic void decode(byte[] a)
SessionStorabledecode 在接口中 SessionStorablea - the srcCopyright © 2022 Seata. All rights reserved.