![]() |
TYPO3
7.6
|
Public Member Functions | |
__construct ($subject) | |
__destruct () | |
release () | |
isAcquired () | |
acquire ($mode=self::LOCK_CAPABILITY_EXCLUSIVE) | |
destroy () | |
Static Public Member Functions | |
static | getCapabilities () |
static | getPriority () |
Public Attributes | |
const | FILE_LOCK_FOLDER = 'typo3temp/locks/' |
![]() | |
const | LOCK_CAPABILITY_EXCLUSIVE = 1 |
const | LOCK_CAPABILITY_SHARED = 2 |
const | LOCK_CAPABILITY_NOBLOCK = 4 |
Protected Attributes | |
$id | |
$resource | |
$filePath = '' | |
$isAcquired = false | |
Semaphore locking
Definition at line 24 of file SemaphoreLockStrategy.php.
__construct | ( | $subject | ) |
string | $subject | ID to identify this lock in the system |
LockCreateException |
Implements LockingStrategyInterface.
Definition at line 52 of file SemaphoreLockStrategy.php.
References GeneralUtility\mkdir().
__destruct | ( | ) |
Destructor
Definition at line 77 of file SemaphoreLockStrategy.php.
References SemaphoreLockStrategy\release().
acquire | ( | $mode = self::LOCK_CAPABILITY_EXCLUSIVE | ) |
Try to acquire a lock
int | $mode | LOCK_CAPABILITY_EXCLUSIVE |
LockAcquireException | if a semaphore could not be retrieved |
Implements LockingStrategyInterface.
Definition at line 129 of file SemaphoreLockStrategy.php.
References SemaphoreLockStrategy\$isAcquired, and SemaphoreLockStrategy\isAcquired().
destroy | ( | ) |
Destroys the resource associated with the lock
Implements LockingStrategyInterface.
Definition at line 157 of file SemaphoreLockStrategy.php.
|
static |
Implements LockingStrategyInterface.
Definition at line 114 of file SemaphoreLockStrategy.php.
|
static |
Implements LockingStrategyInterface.
Definition at line 147 of file SemaphoreLockStrategy.php.
isAcquired | ( | ) |
Get status of this lock
Implements LockingStrategyInterface.
Definition at line 106 of file SemaphoreLockStrategy.php.
References SemaphoreLockStrategy\$isAcquired.
Referenced by SemaphoreLockStrategy\acquire(), and SemaphoreLockStrategy\release().
release | ( | ) |
Release the lock
Implements LockingStrategyInterface.
Definition at line 92 of file SemaphoreLockStrategy.php.
References SemaphoreLockStrategy\isAcquired().
Referenced by SemaphoreLockStrategy\__destruct().
|
protected |
Definition at line 41 of file SemaphoreLockStrategy.php.
|
protected |
Definition at line 31 of file SemaphoreLockStrategy.php.
|
protected |
Definition at line 46 of file SemaphoreLockStrategy.php.
Referenced by SemaphoreLockStrategy\acquire(), and SemaphoreLockStrategy\isAcquired().
|
protected |
Definition at line 36 of file SemaphoreLockStrategy.php.
const FILE_LOCK_FOLDER = 'typo3temp/locks/' |
Definition at line 26 of file SemaphoreLockStrategy.php.