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 Deprecated Methods Modifier and Type Method Description longawaitPendingTransactionsForAllKeys(org.infinispan.context.impl.TxInvocationContext<?> ctx, java.util.Collection<java.lang.Object> keys, long time, java.util.concurrent.TimeUnit unit)Deprecated.Since 10.0, the blocking variants will be removedlongawaitPendingTransactionsForKey(org.infinispan.context.impl.TxInvocationContext<?> ctx, java.lang.Object key, long time, java.util.concurrent.TimeUnit unit)Deprecated.Since 10.0, the blocking variants will be removedPendingLockPromisecheckPendingTransactionsForKey(org.infinispan.context.impl.TxInvocationContext<?> ctx, java.lang.Object key, long time, java.util.concurrent.TimeUnit unit)Same asawaitPendingTransactionsForKey(TxInvocationContext, Object, long, TimeUnit)but non-blocking.PendingLockPromisecheckPendingTransactionsForKeys(org.infinispan.context.impl.TxInvocationContext<?> ctx, java.util.Collection<java.lang.Object> keys, long time, java.util.concurrent.TimeUnit unit)Same asawaitPendingTransactionsForAllKeys(TxInvocationContext, Collection, long, TimeUnit)but non-blocking.
-
-
-
Method Detail
-
checkPendingTransactionsForKey
PendingLockPromise checkPendingTransactionsForKey(org.infinispan.context.impl.TxInvocationContext<?> ctx, java.lang.Object key, long time, java.util.concurrent.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, java.util.Collection<java.lang.Object> keys, long time, java.util.concurrent.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
@Deprecated long awaitPendingTransactionsForKey(org.infinispan.context.impl.TxInvocationContext<?> ctx, java.lang.Object key, long time, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedExceptionDeprecated.Since 10.0, the blocking variants will be removedIt 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:
java.lang.InterruptedException- if the thread is interrupted while waiting.
-
awaitPendingTransactionsForAllKeys
@Deprecated long awaitPendingTransactionsForAllKeys(org.infinispan.context.impl.TxInvocationContext<?> ctx, java.util.Collection<java.lang.Object> keys, long time, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedExceptionDeprecated.Since 10.0, the blocking variants will be removedIt 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:
java.lang.InterruptedException- if the thread is interrupted while waiting.
-
-