Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/proxy/IMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,10 @@ export interface IMap<K, V> extends DistributedObject {
* Releases the lock for the specified key regardless of the owner.
* This operation always unlocks the key.
*
* **Warning:** This method should be used with caution.
* It releases the lock even if it was acquired by another client.
* That can lead to data inconsistencies if not used properly.
*
* @param key the key of the map entry
* @throws AssertionError if `key` is `null`
*/
Expand All @@ -351,6 +355,8 @@ export interface IMap<K, V> extends DistributedObject {
/**
* Checks whether given key is locked.
*
* This method returns `true` if the key is locked by any client.
*
* @param key the key of the map entry
* @throws AssertionError if `key` is `null`
* @returns `true` if key is locked, `false` otherwise
Expand All @@ -373,6 +379,10 @@ export interface IMap<K, V> extends DistributedObject {
* method must be called the same amount of times, otherwise the lock will
* remain unavailable.
*
* **Important:**
* In the Node.js client, all lock operations from the same client instance share the same lock ownership.
* This differs from the Java client where each thread has separate lock ownership.
*
* @param key the key of the map entry
* @param leaseTime lock is automatically unlocked after `leaseTime`
* milliseconds; defaults to infinity
Expand Down Expand Up @@ -542,6 +552,9 @@ export interface IMap<K, V> extends DistributedObject {
* `unlock()` method must be called the same amount of times, otherwise the
* lock will remain unavailable.
*
* **Important:**
* In the Node.js client, all lock operations from the same client instance share the same lock ownership.
*
* @param key the key of the map entry
* @param timeout server waits for `timeout` milliseconds to acquire
* the lock before giving up; defaults to `0`
Expand Down
Loading