Protected ReadonlyoptionsProtected ReadonlyscriptAtomic 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
Atomically 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
Delete key
Key to delete
Promise resolving to number of deleted keys
Delete key only if value matches (atomic operation)
Redis key
Expected value
Promise resolving to true if deleted, false otherwise
Disconnect from Redis
Promise that resolves when disconnected
Extend 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
Get value by key
Redis key
Promise resolving to value or null if not found
Get the underlying GLIDE client (for advanced usage)
Atomically 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
ProtectedinterpretCheck 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
Ping Redis server
Promise resolving to 'PONG'
ProtectedprefixAdds prefix to key if configured
Set 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
ProtectedwithStaticfromFactory method to create adapter from client
Optionaloptions: RedisAdapterOptions
Redis adapter for Valkey GLIDE clients. Provides unified interface for GLIDE-specific operations.
GLIDE (GLIde for Distributed Execution) is Valkey's official client library that supports both Valkey and Redis servers.