Interface PendingLockManager
-
public interface PendingLockManagerA manager that checks and waits for older topology transaction with conflicting keys.- Since:
- 8.0
- Author:
- Pedro Ruivo
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longawaitPendingTransactionsForAllKeys(org.infinispan.context.impl.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 inkeysacquired.longawaitPendingTransactionsForKey(org.infinispan.context.impl.TxInvocationContext<?> ctx, Object key, long time, TimeUnit unit)It waits for any transaction with older topology id to complete that may have the lock forkeyacquired.PendingLockPromisecheckPendingTransactionsForKey(org.infinispan.context.impl.TxInvocationContext<?> ctx, Object key, long time, TimeUnit unit)Same asawaitPendingTransactionsForKey(TxInvocationContext, Object, long, TimeUnit)but non-blocking.PendingLockPromisecheckPendingTransactionsForKeys(org.infinispan.context.impl.TxInvocationContext<?> ctx, Collection<Object> keys, long time, TimeUnit unit)Same asawaitPendingTransactionsForAllKeys(TxInvocationContext, Collection, long, TimeUnit)but non-blocking.
-
-
-
Method Detail
-
checkPendingTransactionsForKey
PendingLockPromise checkPendingTransactionsForKey(org.infinispan.context.impl.TxInvocationContext<?> ctx, Object key, long time, TimeUnit unit)
Same asawaitPendingTransactionsForKey(TxInvocationContext, Object, long, TimeUnit)but non-blocking.Multiple invocations with the same transaction returns the same
PendingLockPromise. For cleanup purposes,awaitPendingTransactionsForKey(TxInvocationContext, Object, long, TimeUnit)must be invoked afterwards.- Parameters:
ctx- theTxInvocationContext.key- the key to check.time- timeout.unit-TimeUnitoftime.- Returns:
- a
PendingLockPromise.
-
checkPendingTransactionsForKeys
PendingLockPromise checkPendingTransactionsForKeys(org.infinispan.context.impl.TxInvocationContext<?> ctx, Collection<Object> keys, long time, TimeUnit unit)
Same asawaitPendingTransactionsForAllKeys(TxInvocationContext, Collection, long, TimeUnit)but non-blocking.Multiple invocations with the same transaction returns the same
PendingLockPromise. For cleanup purposes,awaitPendingTransactionsForAllKeys(TxInvocationContext, Collection, long, TimeUnit)must be invoked afterwards.- Parameters:
ctx- theTxInvocationContext.keys- the keys to check.time- timeout.unit-TimeUnitoftime.- Returns:
- a
PendingLockPromise.
-
awaitPendingTransactionsForKey
long awaitPendingTransactionsForKey(org.infinispan.context.impl.TxInvocationContext<?> ctx, Object key, long time, TimeUnit unit) throws InterruptedExceptionIt waits for any transaction with older topology id to complete that may have the lock forkeyacquired.- Parameters:
ctx- theTxInvocationContext.key- the key to check.time- timeout.unit-TimeUnitoftime.- Returns:
- the remaining timeout.
- Throws:
InterruptedException- if the thread is interrupted while waiting.
-
awaitPendingTransactionsForAllKeys
long awaitPendingTransactionsForAllKeys(org.infinispan.context.impl.TxInvocationContext<?> ctx, Collection<Object> keys, long time, TimeUnit unit) throws InterruptedExceptionIt waits for any transaction with older topology id to complete that may have the lock for any key inkeysacquired.- Parameters:
ctx- theTxInvocationContext.keys- the keys to check.time- timeout.unit-TimeUnitoftime.- Returns:
- the remaining timeout.
- Throws:
InterruptedException- if the thread is interrupted while waiting.
-
-