Class TransactionKeyLockManager
java.lang.Object
com.loomcache.server.transaction.TransactionKeyLockManager
Owns pessimistic transactional map-key lock state.
The state is an owner-token table, not a JVM lock held across the transaction lifetime. That keeps Raft apply threads non-blocking: applying TX_LOCK_KEY either records ownership for the transaction or fails fast when another transaction owns the same map/key.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidassertMapWriteAllowed(@Nullable UUID transactionId, String mapName) voidassertWriteAllowed(@Nullable UUID transactionId, String mapName, String key) booleanisLockedByOther(@Nullable UUID transactionId, String mapName, String key) voidvoidlockAll(UUID transactionId, Collection<TransactionKeyLockManager.LockedKey> lockedKeys) voidreleaseAll(UUID transactionId) snapshotLocks(UUID transactionId) static @Nullable UUIDtransactionIdFromSenderId(@Nullable String senderId)
-
Constructor Details
-
TransactionKeyLockManager
public TransactionKeyLockManager()
-
-
Method Details
-
lock
-
lockAll
-
assertWriteAllowed
-
assertMapWriteAllowed
-
releaseAll
-
snapshotLocks
-
isLockedByOther
-
transactionIdFromSenderId
-