Key
class Key
Key is a container for the state of the locks in stores.
Methods
Details
__construct(string $resource)
Parameters
__toString()
bool hasState(string $stateKey)
Parameters
Return Value
setState(string $stateKey, mixed $state)
Parameters
string |
$stateKey |
|
mixed |
$state |
|
removeState(string $stateKey)
Parameters
mixed getState($stateKey)
Parameters
Return Value
resetLifetime()
reduceLifetime(float $ttl)
Parameters
float |
$ttl |
the expiration delay of locks in seconds |
float|null getRemainingLifetime()
Returns the remaining lifetime.
Return Value
float|null |
Remaining lifetime in seconds. Null when the key won't expire. |
bool isExpired()
Return Value