public abstract class AbstractLockManager extends Object implements LockManager
| 限定符和类型 | 字段和说明 |
|---|---|
protected static org.slf4j.Logger |
LOGGER
The constant LOGGER.
|
| 构造器和说明 |
|---|
AbstractLockManager() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
acquireLock(BranchSession branchSession)
Acquire lock boolean.
|
boolean |
acquireLock(BranchSession branchSession,
boolean autoCommit,
boolean skipCheckLock)
Acquire lock boolean.
|
void |
cleanAllLocks()
Clean all locks.
|
List<RowLock> |
collectRowLocks(BranchSession branchSession)
Collect row locks list
|
protected List<RowLock> |
collectRowLocks(String lockKey,
String resourceId,
String xid)
Collect row locks list.
|
protected List<RowLock> |
collectRowLocks(String lockKey,
String resourceId,
String xid,
Long transactionId,
Long branchID)
Collect row locks list.
|
protected Locker |
getLocker()
Gets locker.
|
protected abstract Locker |
getLocker(BranchSession branchSession)
Gets locker.
|
boolean |
isLockable(String xid,
String resourceId,
String lockKey)
Is lockable boolean.
|
boolean |
releaseLock(BranchSession branchSession)
Un lock boolean.
|
void |
updateLockStatus(String xid,
LockStatus lockStatus)
update lock status.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreleaseGlobalSessionLockpublic boolean acquireLock(BranchSession branchSession) throws TransactionException
LockManageracquireLock 在接口中 LockManagerbranchSession - the branch sessionTransactionException - the transaction exceptionpublic boolean acquireLock(BranchSession branchSession, boolean autoCommit, boolean skipCheckLock) throws TransactionException
LockManageracquireLock 在接口中 LockManagerbranchSession - the branch sessionautoCommit - the auto commitskipCheckLock - whether skip check lock or notTransactionException - the transaction exceptionpublic boolean releaseLock(BranchSession branchSession) throws TransactionException
LockManagerreleaseLock 在接口中 LockManagerbranchSession - the branch sessionTransactionException - the transaction exceptionpublic boolean isLockable(String xid, String resourceId, String lockKey) throws TransactionException
LockManagerisLockable 在接口中 LockManagerxid - the xidresourceId - the resource idlockKey - the lock keyTransactionException - the transaction exceptionpublic void cleanAllLocks()
throws TransactionException
LockManagercleanAllLocks 在接口中 LockManagerTransactionException - the transaction exceptionprotected Locker getLocker()
protected abstract Locker getLocker(BranchSession branchSession)
branchSession - the branch sessionpublic List<RowLock> collectRowLocks(BranchSession branchSession)
LockManagercollectRowLocks 在接口中 LockManagerbranchSession - the branch sessionprotected List<RowLock> collectRowLocks(String lockKey, String resourceId, String xid)
lockKey - the lock keyresourceId - the resource idxid - the xidprotected List<RowLock> collectRowLocks(String lockKey, String resourceId, String xid, Long transactionId, Long branchID)
lockKey - the lock keyresourceId - the resource idxid - the xidtransactionId - the transaction idbranchID - the branch idpublic void updateLockStatus(String xid, LockStatus lockStatus)
LockManagerupdateLockStatus 在接口中 LockManagerxid - the xidlockStatus - the lock statusCopyright © 2022 Seata. All rights reserved.