Retrieves the current writer lock data for a given key.
Readable execution context for the operation
Unique identifier for the shared lock
Lock data with owner and expiration if found, otherwise null
Removes the writer lock regardless of current owner. Used for administrative cleanup or forced unlock.
Readable execution context for the operation
Unique identifier for the shared lock to remove
Expiration data of the removed lock, or null if not found
Removes the writer lock only if owned by the specified lock ID. Ensures only the lock holder can release it.
Readable execution context for the operation
Unique identifier for the shared lock
Expected owner's lock identifier
Lock data if successfully removed, null if not found or owner mismatch
Extends the writer lock expiration if owned by the specified lock ID. Refreshes the lock hold period (heartbeat/keep-alive).
Readable execution context for the operation
Unique identifier for the shared lock
Expected owner's lock identifier
New expiration time
Number >= 1 if updated, 0 if not found or owner mismatch
Creates a new writer lock or updates the existing one. Stores the lock owner and expiration state atomically.
Readable execution context for the operation
Unique identifier for the shared lock
Unique identifier of the lock owner/acquirer
When the lock expires, or null for indefinite
Transaction context for writer (exclusive) lock operations. Provides CRUD methods for managing write lock state within a database transaction.
Writer locks are exclusive: only one entity can hold the lock at a time. When a writer lock is held, no readers can acquire slots.
IMPORT_PATH:
"@daiso-tech/core/shared-lock/contracts"