‪TYPO3CMS  10.4
TYPO3\CMS\Core\Locking\LockFactory Class Reference
Inheritance diagram for TYPO3\CMS\Core\Locking\LockFactory:
TYPO3\CMS\Core\SingletonInterface

Public Member Functions

 addLockingStrategy ($className)
 
 removeLockingStrategy ($className)
 
LockingStrategyInterface createLocker ($id, $capabilities=LockingStrategyInterface::LOCK_CAPABILITY_EXCLUSIVE)
 

Protected Attributes

bool[] $lockingStrategy
 

Detailed Description

Factory class to retrieve a locking method

Definition at line 24 of file LockFactory.php.

Member Function Documentation

◆ addLockingStrategy()

TYPO3\CMS\Core\Locking\LockFactory::addLockingStrategy (   $className)

Add a locking method

Parameters
string$className
Exceptions

Definition at line 40 of file LockFactory.php.

◆ createLocker()

LockingStrategyInterface TYPO3\CMS\Core\Locking\LockFactory::createLocker (   $id,
  $capabilities = LockingStrategyInterface::LOCK_CAPABILITY_EXCLUSIVE 
)

Get best matching locking method

Parameters
string$id‪ID to identify this lock in the system
int$capabilities‪LockingStrategyInterface::LOCK_CAPABILITY_* elements combined with bit-wise OR
Returns
LockingStrategyInterface Class name for a locking method
Exceptions
LockCreateException‪if no locker could be created with the requested capabilities

Definition at line 68 of file LockFactory.php.

◆ removeLockingStrategy()

TYPO3\CMS\Core\Locking\LockFactory::removeLockingStrategy (   $className)

Remove a locking method

Parameters
string$className

Definition at line 55 of file LockFactory.php.

Member Data Documentation

◆ $lockingStrategy

bool [] TYPO3\CMS\Core\Locking\LockFactory::$lockingStrategy
protected
Initial value:
= array(
SemaphoreLockStrategy::class => true,
FileLockStrategy::class => true,
SimpleLockStrategy::class => true
)

Definition at line 28 of file LockFactory.php.