is_locked() is_locked(string $lock_type) : bool Check if a lock is set for a given lock type. Parameters string $lock_type A string to identify different lock types. Returns bool
set() set(string $lock_type) : bool Set a lock. To prevent race conditions, implementations should avoid setting the lock if the lock is already held. Parameters string $lock_type A string to identify different lock types. Returns bool
get_expiration() get_expiration(string $lock_type) : bool|int If a lock is set, return the timestamp it was set to expiry. Parameters string $lock_type A string to identify different lock types. Returns bool|int — False if no lock is set, otherwise the timestamp for when the lock is set to expire.
get_duration() get_duration(string $lock_type) : int Get the amount of time to set for a given lock. 60 seconds by default. Parameters string $lock_type A string to identify different lock types. Returns int