Class NoOpPendingLockManager
java.lang.Object
org.infinispan.util.concurrent.locks.impl.NoOpPendingLockManager
- All Implemented Interfaces:
PendingLockManager
An
PendingLockManager
implementation that does nothing.- Since:
- 8.0
- Author:
- Pedro Ruivo
-
Method Summary
Modifier and TypeMethodDescriptionlong
awaitPendingTransactionsForAllKeys
(TxInvocationContext<?> ctx, Collection<Object> keys, long time, TimeUnit unit) It waits for any transaction with older topology id to complete that may have the lock for any key inkeys
acquired.long
awaitPendingTransactionsForKey
(TxInvocationContext<?> ctx, Object key, long time, TimeUnit unit) It waits for any transaction with older topology id to complete that may have the lock forkey
acquired.checkPendingTransactionsForKey
(TxInvocationContext<?> ctx, Object key, long time, TimeUnit unit) Same asPendingLockManager.awaitPendingTransactionsForKey(TxInvocationContext, Object, long, TimeUnit)
but non-blocking.checkPendingTransactionsForKeys
(TxInvocationContext<?> ctx, Collection<Object> keys, long time, TimeUnit unit) Same asPendingLockManager.awaitPendingTransactionsForAllKeys(TxInvocationContext, Collection, long, TimeUnit)
but non-blocking.static NoOpPendingLockManager
-
Method Details
-
getInstance
-
checkPendingTransactionsForKey
public PendingLockPromise checkPendingTransactionsForKey(TxInvocationContext<?> ctx, Object key, long time, TimeUnit unit) Description copied from interface:PendingLockManager
Same asPendingLockManager.awaitPendingTransactionsForKey(TxInvocationContext, Object, long, TimeUnit)
but non-blocking.Multiple invocations with the same transaction returns the same
PendingLockPromise
. For cleanup purposes,PendingLockManager.awaitPendingTransactionsForKey(TxInvocationContext, Object, long, TimeUnit)
must be invoked afterwards.- Specified by:
checkPendingTransactionsForKey
in interfacePendingLockManager
- Parameters:
ctx
- theTxInvocationContext
.key
- the key to check.time
- timeout.unit
-TimeUnit
oftime
.- Returns:
- a
PendingLockPromise
.
-
checkPendingTransactionsForKeys
public PendingLockPromise checkPendingTransactionsForKeys(TxInvocationContext<?> ctx, Collection<Object> keys, long time, TimeUnit unit) Description copied from interface:PendingLockManager
Same asPendingLockManager.awaitPendingTransactionsForAllKeys(TxInvocationContext, Collection, long, TimeUnit)
but non-blocking.Multiple invocations with the same transaction returns the same
PendingLockPromise
. For cleanup purposes,PendingLockManager.awaitPendingTransactionsForAllKeys(TxInvocationContext, Collection, long, TimeUnit)
must be invoked afterwards.- Specified by:
checkPendingTransactionsForKeys
in interfacePendingLockManager
- Parameters:
ctx
- theTxInvocationContext
.keys
- the keys to check.time
- timeout.unit
-TimeUnit
oftime
.- Returns:
- a
PendingLockPromise
.
-
awaitPendingTransactionsForKey
public long awaitPendingTransactionsForKey(TxInvocationContext<?> ctx, Object key, long time, TimeUnit unit) throws InterruptedException Description copied from interface:PendingLockManager
It waits for any transaction with older topology id to complete that may have the lock forkey
acquired.- Specified by:
awaitPendingTransactionsForKey
in interfacePendingLockManager
- Parameters:
ctx
- theTxInvocationContext
.key
- the key to check.time
- timeout.unit
-TimeUnit
oftime
.- Returns:
- the remaining timeout.
- Throws:
InterruptedException
- if the thread is interrupted while waiting.
-
awaitPendingTransactionsForAllKeys
public long awaitPendingTransactionsForAllKeys(TxInvocationContext<?> ctx, Collection<Object> keys, long time, TimeUnit unit) throws InterruptedException Description copied from interface:PendingLockManager
It waits for any transaction with older topology id to complete that may have the lock for any key inkeys
acquired.- Specified by:
awaitPendingTransactionsForAllKeys
in interfacePendingLockManager
- Parameters:
ctx
- theTxInvocationContext
.keys
- the keys to check.time
- timeout.unit
-TimeUnit
oftime
.- Returns:
- the remaining timeout.
- Throws:
InterruptedException
- if the thread is interrupted while waiting.
-