Method | Description | |
---|---|---|
check_lock ( $lock, $limit = null, $timeout = null ) : boolean | Set a lock and limit how many concurrent jobs are permitted | |
free_lock ( $lock, $expires ) | When event completes, allow another | |
get_lock_timestamp ( $lock ) | Retrieve a lock's timestamp | |
get_lock_value ( $lock ) | Retrieve a lock from cache | |
prime_lock ( $lock, $expires ) | Ensure lock entries are initially set | |
reset_lock ( $lock, $expires ) | Clear a lock's current values, in order to free it |
Method | Description | |
---|---|---|
get_key ( $lock, $type = 'lock' ) | Build cache key |
public static check_lock ( $lock, $limit = null, $timeout = null ) : boolean | ||
$lock | string Lock name | |
$limit | int Concurrency limit | |
$timeout | int Timeout in seconds | |
return | boolean |
public static free_lock ( $lock, $expires ) |
public static get_lock_timestamp ( $lock ) |
public static get_lock_value ( $lock ) |
public static prime_lock ( $lock, $expires ) |
public static reset_lock ( $lock, $expires ) |