Lock
class Lock
Methods
void
bool
exists(string $key)
Determine if a lock exists for the given key.
bool
get(string $key, int $seconds = 60)
Attempt to get a lock for the given key.
void
release(string $key)
Release the lock for the given key.
connection()
Get the Redis connection instance.
Details
at line 20
__construct(Factory $redis)
Create a Horizon lock manager.
at line 28
void
with(string $key, Closure $callback, int $seconds = 60)
Execute the given callback if a lock can be acquired.
at line 38
bool
exists(string $key)
Determine if a lock exists for the given key.
at line 46
bool
get(string $key, int $seconds = 60)
Attempt to get a lock for the given key.
at line 56
void
release(string $key)
Release the lock for the given key.
at line 76
RedisProxy
connection()
Get the Redis connection instance.