class Key

Key is a container for the state of the locks in stores.

Methods

__construct(string $resource)

No description

__toString()

No description

bool
hasState(string $stateKey)

No description

void
setState(string $stateKey, $state)

No description

void
removeState(string $stateKey)

No description

getState(string $stateKey)

No description

resetLifetime()

No description

reduceLifetime(float $ttl)

No description

float|null
getRemainingLifetime()

Returns the remaining lifetime.

bool
isExpired()

No description

Details

at line 25
__construct(string $resource)

Parameters

string $resource

at line 30
__toString()

at line 35
bool hasState(string $stateKey)

Parameters

string $stateKey

Return Value

bool

at line 40
void setState(string $stateKey, $state)

Parameters

string $stateKey
$state

Return Value

void

at line 45
void removeState(string $stateKey)

Parameters

string $stateKey

Return Value

void

at line 50
getState(string $stateKey)

Parameters

string $stateKey

at line 55
resetLifetime()

at line 63
reduceLifetime(float $ttl)

Parameters

float $ttl the expiration delay of locks in seconds

at line 77
float|null getRemainingLifetime()

Returns the remaining lifetime.

Return Value

float|null Remaining lifetime in seconds. Null when the key won't expire.

at line 85
bool isExpired()

Return Value

bool