AbstractProtected ReadonlyoptionsProtected ReadonlyscriptAbstractatomicAtomic extension with TTL feedback and race condition protection
Redis key
Expected value
Minimum TTL required for extension (race condition protection)
New TTL to set in milliseconds
Promise resolving to atomic extension result with TTL feedback
AbstractbatchAtomically acquire multiple locks in a single operation All-or-nothing semantics: either all locks are acquired or none
Array of Redis keys to lock
Array of values (one per key, same length as keys)
Time to live in milliseconds for all locks
Promise resolving to batch acquisition result
AbstractdelDelete key
Key to delete
Promise resolving to number of deleted keys
AbstractdelDelete key only if value matches (atomic operation)
Redis key
Expected value
Promise resolving to true if deleted, false otherwise
AbstractdisconnectDisconnect from Redis
Promise that resolves when disconnected
AbstractextendExtend TTL of a key only if value matches (atomic operation)
Redis key
Expected value
New TTL in milliseconds
Promise resolving to true if extended, false otherwise
AbstractgetGet value by key
Redis key
Promise resolving to value or null if not found
AbstractinspectAtomically inspect a lock's current state Returns the lock value (owner) and remaining TTL in a single operation
Redis key to inspect
Promise resolving to LockInspection if key exists, null otherwise
ProtectedinterpretAbstractisCheck if adapter is connected
Connection status
ProtectedparseParse batch acquisition script result into BatchAcquireResult Ensures consistent handling across all adapters
Lua script result [resultCode, countOrIndex, failedKey?]
Original keys array for fallback lookup
BatchAcquireResult object
ProtectedparseParse inspection script result into LockInspection object Ensures consistent handling of Lua array return value across all adapters
Lua script result [value, ttl] or null
LockInspection object or null if key doesn't exist
AbstractpingPing Redis server
Promise resolving to 'PONG'
ProtectedprefixAdds prefix to key if configured
AbstractsetSet key with value if not exists, with TTL in milliseconds
Redis key
Value to set
Time to live in milliseconds
Promise resolving to 'OK' on success, null if key exists
ProtectedstripProtectedvalidateValidate batch acquisition parameters Ensures consistent validation across all adapters
ProtectedvalidateValidates lock key format and requirements
ProtectedvalidateValidates TTL (time-to-live) value
ProtectedvalidateValidates lock value format and requirements
Protectedwith
Base adapter class providing common functionality for all Redis clients. Implements validation and error handling that's shared across adapters.