TYPO3
7.6
|
Public Member Functions | |
__construct ($subject) | |
__destruct () | |
acquire ($mode=self::LOCK_CAPABILITY_EXCLUSIVE) | |
release () | |
isAcquired () | |
destroy () | |
Static Public Member Functions | |
static | getPriority () |
static | getCapabilities () |
Public Attributes | |
const | FILE_LOCK_FOLDER = 'typo3temp/locks/' |
Public Attributes inherited from LockingStrategyInterface | |
const | LOCK_CAPABILITY_EXCLUSIVE = 1 |
const | LOCK_CAPABILITY_SHARED = 2 |
const | LOCK_CAPABILITY_NOBLOCK = 4 |
Protected Attributes | |
$filePointer | |
$filePath | |
$isAcquired = false | |
flock() locking
Definition at line 25 of file FileLockStrategy.php.
__construct | ( | $subject | ) |
string | $subject | ID to identify this lock in the system |
LockCreateException | if the lock could not be created |
Implements LockingStrategyInterface.
Definition at line 48 of file FileLockStrategy.php.
References GeneralUtility\mkdir().
__destruct | ( | ) |
Destructor: Releases lock automatically when instance is destroyed and release resources
Definition at line 74 of file FileLockStrategy.php.
References FileLockStrategy\release().
acquire | ( | $mode = self::LOCK_CAPABILITY_EXCLUSIVE | ) |
Try to acquire an exclusive lock
int | $mode | LOCK_CAPABILITY_EXCLUSIVE or LOCK_CAPABILITY_SHARED or self::LOCK_CAPABILITY_NOBLOCK |
LockAcquireException | if the lock could not be acquired |
LockAcquireWouldBlockException | if the acquire would have blocked and NOBLOCK was set |
Implements LockingStrategyInterface.
Definition at line 87 of file FileLockStrategy.php.
References FileLockStrategy\$isAcquired, GeneralUtility\fixPermissions(), and FileLockStrategy\isAcquired().
destroy | ( | ) |
Destroys the resource associated with the lock
Implements LockingStrategyInterface.
Definition at line 179 of file FileLockStrategy.php.
|
static |
Implements LockingStrategyInterface.
Definition at line 156 of file FileLockStrategy.php.
|
static |
Implements LockingStrategyInterface.
Definition at line 148 of file FileLockStrategy.php.
isAcquired | ( | ) |
Get status of this lock
Implements LockingStrategyInterface.
Definition at line 140 of file FileLockStrategy.php.
References FileLockStrategy\$isAcquired.
Referenced by FileLockStrategy\acquire(), and FileLockStrategy\release().
release | ( | ) |
Release the lock
Implements LockingStrategyInterface.
Definition at line 119 of file FileLockStrategy.php.
References FileLockStrategy\isAcquired().
Referenced by FileLockStrategy\__destruct().
|
protected |
Definition at line 37 of file FileLockStrategy.php.
|
protected |
Definition at line 32 of file FileLockStrategy.php.
|
protected |
Definition at line 42 of file FileLockStrategy.php.
Referenced by FileLockStrategy\acquire(), and FileLockStrategy\isAcquired().
const FILE_LOCK_FOLDER = 'typo3temp/locks/' |
Definition at line 27 of file FileLockStrategy.php.