public class EnqueueLockFunction extends Object implements TransactionalFunction<Long>
| Constructor and Description |
|---|
EnqueueLockFunction(LockRequest lockRequest) |
| Modifier and Type | Method and Description |
|---|---|
Long |
execute(MultiDataSourceJdbcResource jdbcResource)
This enters locks into the queue in
LockInfo.LOCK_WAITING mode. |
public EnqueueLockFunction(LockRequest lockRequest)
public Long execute(MultiDataSourceJdbcResource jdbcResource) throws MetaException, TxnAbortedException, NoSuchTxnException
LockInfo.LOCK_WAITING mode.
Isolation Level Notes:
1. We use S4U (withe read_committed) to generate the next (ext) lock id. This serializes
any 2 enqueueLockWithRetry() calls.
2. We use S4U on the relevant TXNS row to block any concurrent abort/commit/etc. operationsexecute in interface TransactionalFunction<Long>jdbcResource - A MultiDataSourceJdbcResource instance responsible for providing all the necessary resources
to be able to perform transactional database calls.MetaException - Thrown in case of application error within the functionTxnAbortedExceptionNoSuchTxnExceptionTxnLockManager.checkLock(long, long, boolean, boolean)Copyright © 2024 The Apache Software Foundation. All rights reserved.