class FlockStore implements StoreInterface
FlockStore is a StoreInterface implementation using the FileSystem flock.
Original implementation in \Symfony\Component\Filesystem\LockHandler.
__construct(string $lockPath = null) | ||
save(Key $key) Stores the resource if it's not locked by someone else. | ||
waitAndSave(Key $key) Waits a key becomes free, then stores the resource. | ||
putOffExpiration(Key $key, float $ttl) Extends the ttl of a resource. | ||
delete(Key $key) Removes a resource from the storage. | ||
bool | exists(Key $key) Returns whether or not the resource exists in the storage. |
string | $lockPath | the directory to store the lock, defaults to the system's temporary directory |
LockStorageException | If the lock directory could not be created or is not writable |
Stores the resource if it's not locked by someone else.
Key | $key | key to lock |
LockConflictedException |
Waits a key becomes free, then stores the resource.
If the store does not support this feature it should throw a NotSupportedException.
Key | $key | key to lock |
LockConflictedException | |
NotSupportedException |
Extends the ttl of a resource.
If the store does not support this feature it should throw a NotSupportedException.
Key | $key | key to lock |
float | $ttl | amount of second to keep the lock in the store |
LockConflictedException | |
NotSupportedException |
Removes a resource from the storage.
Key | $key | key to remove |
Returns whether or not the resource exists in the storage.
Key | $key | key to remove |
bool |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Lock/Store/FlockStore.html