Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (ResourceConnection $resource, DeploymentConfig $deploymentConfig, string $prefix=null) | |
lock (string $name, int $timeout=-1) | |
unlock (string $name) | |
isLocked (string $name) | |
LockManager using the DB locks
Definition at line 20 of file Database.php.
__construct | ( | ResourceConnection | $resource, |
DeploymentConfig | $deploymentConfig, | ||
string | $prefix = null |
||
) |
ResourceConnection | $resource | |
DeploymentConfig | $deploymentConfig | |
string | null | $prefix |
Definition at line 47 of file Database.php.
isLocked | ( | string | $name | ) |
Tests of lock is set for name
string | $name | lock name |
InputException |
Implements LockManagerInterface.
Definition at line 126 of file Database.php.
lock | ( | string | $name, |
int | $timeout = -1 |
||
) |
Sets a lock for name
string | $name | lock name |
int | $timeout | How long to wait lock acquisition in seconds, negative value means infinite timeout |
InputException | |
AlreadyExistsException |
Before MySQL 5.7.5, only a single simultaneous lock per connection can be acquired. This limitation can be removed once MySQL minimum requirement has been raised, currently we support MySQL 5.6 way only.
Implements LockManagerInterface.
Definition at line 66 of file Database.php.
unlock | ( | string | $name | ) |
Releases a lock for name
string | $name | lock name |
InputException |
Implements LockManagerInterface.
Definition at line 103 of file Database.php.