class Factory implements LoggerAwareInterface

Factory provides method to create locks.

Traits

LoggerAwareTrait

Methods

__construct(StoreInterface $store)

No description

createLock(string $resource, float $ttl = 300.0, bool $autoRelease = true)

Creates a lock for the given resource.

Details

at line line 29
__construct(StoreInterface $store)

Parameters

StoreInterface $store

at line line 45
Lock createLock(string $resource, float $ttl = 300.0, bool $autoRelease = true)

Creates a lock for the given resource.

Parameters

string $resource The resource to lock
float $ttl Maximum expected lock duration in seconds
bool $autoRelease Whether to automatically release the lock or not when the lock instance is destroyed

Return Value

Lock