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

__construct(string $resource)

Parameters

string $resource

__toString()

bool hasState(string $stateKey)

Parameters

string $stateKey

Return Value

bool

void setState(string $stateKey, $state)

Parameters

string $stateKey
$state

Return Value

void

void removeState(string $stateKey)

Parameters

string $stateKey

Return Value

void

getState(string $stateKey)

Parameters

string $stateKey

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

bool