Interface PendingLockManager
-
public interface PendingLockManager
A 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 long
awaitPendingTransactionsForAllKeys(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 removedlong
awaitPendingTransactionsForKey(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 removedPendingLockPromise
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.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.
-
-
-
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
-TimeUnit
oftime
.- 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
-TimeUnit
oftime
.- 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.InterruptedException
Deprecated.Since 10.0, the blocking variants will be removedIt waits for any transaction with older topology id to complete that may have the lock forkey
acquired.- Parameters:
ctx
- theTxInvocationContext
.key
- the key to check.time
- timeout.unit
-TimeUnit
oftime
.- 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.InterruptedException
Deprecated.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 inkeys
acquired.- Parameters:
ctx
- theTxInvocationContext
.keys
- the keys to check.time
- timeout.unit
-TimeUnit
oftime
.- Returns:
- the remaining timeout.
- Throws:
java.lang.InterruptedException
- if the thread is interrupted while waiting.
-
-