Interface PendingLockManager
- All Known Implementing Classes:
DefaultPendingLockManager
,NoOpPendingLockManager
public interface PendingLockManager
A manager that checks and waits for older topology transaction with conflicting keys.
- Since:
- 8.0
- Author:
- Pedro Ruivo
-
Method Summary
Modifier and TypeMethodDescriptioncheckPendingTransactionsForKey
(TxInvocationContext<?> ctx, Object key, long time, TimeUnit unit) Check for any transaction with older topology id to complete that may have the lock for any key inkeys
acquired.checkPendingTransactionsForKeys
(TxInvocationContext<?> ctx, Collection<Object> keys, long time, TimeUnit unit) Check for any transaction with older topology id to complete that may have the lock for any key inkeys
acquired.
-
Method Details
-
checkPendingTransactionsForKey
PendingLockPromise checkPendingTransactionsForKey(TxInvocationContext<?> ctx, Object key, long time, TimeUnit unit) Check for any transaction with older topology id to complete that may have the lock for any key inkeys
acquired.Multiple invocations with the same transaction returns the same
PendingLockPromise
.- Parameters:
ctx
- theTxInvocationContext
.key
- the key to check.time
- timeout.unit
-TimeUnit
oftime
.- Returns:
- a
PendingLockPromise
.
-
checkPendingTransactionsForKeys
PendingLockPromise checkPendingTransactionsForKeys(TxInvocationContext<?> ctx, Collection<Object> keys, long time, TimeUnit unit) Check for any transaction with older topology id to complete that may have the lock for any key inkeys
acquired.Multiple invocations with the same transaction returns the same
PendingLockPromise
.- Parameters:
ctx
- theTxInvocationContext
.keys
- the keys to check.time
- timeout.unit
-TimeUnit
oftime
.- Returns:
- a
PendingLockPromise
.
-