Lock
class Lock implements LockInterface, LoggerAwareInterface
Lock is the default implementation of the LockInterface.
Traits
LoggerAwareTrait
Methods
__construct(Key $key, StoreInterface $store, float $ttl = null, bool $autoRelease = true)
No description
__destruct()
Automatically releases the underlying lock when the object is destructed.
bool
acquire(bool $blocking = false)
Acquires the lock. If the lock is acquired by someone else, the parameter blocking
determines whether or not
the call should block until the release of the lock.
refresh($ttl = null)
Increase the duration of an acquired lock.
bool
isAcquired()
Returns whether or not the lock is acquired.
release()
Release the lock.
bool
isExpired()
No description
float|null
getRemainingLifetime()
Returns the remaining lifetime.