‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Tests\Unit\Locking\Fixtures\DummyLock Class Reference
Inheritance diagram for TYPO3\CMS\Core\Tests\Unit\Locking\Fixtures\DummyLock:
TYPO3\CMS\Core\Locking\LockingStrategyInterface

Public Member Functions

 __construct ($subject)
 
bool acquire ($mode=self::LOCK_CAPABILITY_EXCLUSIVE)
 
bool release ()
 
bool isAcquired ()
 
 destroy ()
 

Static Public Member Functions

static int getCapabilities ()
 
static int getPriority ()
 

Additional Inherited Members

- ‪Public Attributes inherited from ‪TYPO3\CMS\Core\Locking\LockingStrategyInterface
const LOCK_CAPABILITY_EXCLUSIVE = 1
 
const LOCK_CAPABILITY_SHARED = 2
 
const LOCK_CAPABILITY_NOBLOCK = 4
 

Detailed Description

Dummy locking

Definition at line 25 of file DummyLock.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Tests\Unit\Locking\Fixtures\DummyLock::__construct (   $subject)
Parameters
string$subject‪ID to identify this lock in the system

Implements TYPO3\CMS\Core\Locking\LockingStrategyInterface.

Definition at line 46 of file DummyLock.php.

Member Function Documentation

◆ acquire()

bool TYPO3\CMS\Core\Tests\Unit\Locking\Fixtures\DummyLock::acquire (   $mode = self::LOCK_CAPABILITY_EXCLUSIVE)

Try to acquire a lock

Parameters
int$mode‪LOCK_CAPABILITY_EXCLUSIVE or LOCK_CAPABILITY_SHARED
Returns
‪bool Returns TRUE if the lock was acquired successfully

Implements TYPO3\CMS\Core\Locking\LockingStrategyInterface.

Definition at line 54 of file DummyLock.php.

◆ destroy()

TYPO3\CMS\Core\Tests\Unit\Locking\Fixtures\DummyLock::destroy ( )

Destroys the resource associated with the lock

Implements TYPO3\CMS\Core\Locking\LockingStrategyInterface.

Definition at line 82 of file DummyLock.php.

◆ getCapabilities()

static int TYPO3\CMS\Core\Tests\Unit\Locking\Fixtures\DummyLock::getCapabilities ( )
static
Returns
‪int LOCK_CAPABILITY_* elements combined with bit-wise OR

Implements TYPO3\CMS\Core\Locking\LockingStrategyInterface.

Definition at line 30 of file DummyLock.php.

References TYPO3\CMS\Core\Locking\LockingStrategyInterface\LOCK_CAPABILITY_EXCLUSIVE.

◆ getPriority()

static int TYPO3\CMS\Core\Tests\Unit\Locking\Fixtures\DummyLock::getPriority ( )
static
Returns
‪int Returns a priority for the method. 0 to 100, 100 is highest

Implements TYPO3\CMS\Core\Locking\LockingStrategyInterface.

Definition at line 38 of file DummyLock.php.

◆ isAcquired()

bool TYPO3\CMS\Core\Tests\Unit\Locking\Fixtures\DummyLock::isAcquired ( )

Get status of this lock

Returns
‪bool Returns TRUE if lock is acquired by this locker, FALSE otherwise

Implements TYPO3\CMS\Core\Locking\LockingStrategyInterface.

Definition at line 74 of file DummyLock.php.

◆ release()

bool TYPO3\CMS\Core\Tests\Unit\Locking\Fixtures\DummyLock::release ( )

Release the lock

Returns
‪bool Returns TRUE on success or FALSE on failure

Implements TYPO3\CMS\Core\Locking\LockingStrategyInterface.

Definition at line 64 of file DummyLock.php.