Factory

class Factory implements LoggerAwareInterface

Factory provides method to create locks.

Traits

LoggerAwareTrait

Methods

__construct(StoreInterface $store)
Lock createLock(string $resource, float $ttl = 300.0, bool $autoRelease = true)

Creates a lock for the given resource.

Details

__construct(StoreInterface $store)

Parameters

StoreInterface $store

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

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.4/Symfony/Component/Lock/Factory.html