TYPO3 CMS  TYPO3_7-6
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)
 
 acquire ($mode=self::LOCK_CAPABILITY_EXCLUSIVE)
 
 release ()
 
 isAcquired ()
 
 destroy ()
 

Static Public Member Functions

static getCapabilities ()
 
static 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 22 of file DummyLock.php.

Constructor & Destructor Documentation

◆ __construct()

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

Implements TYPO3\CMS\Core\Locking\LockingStrategyInterface.

Definition at line 43 of file DummyLock.php.

Member Function Documentation

◆ acquire()

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

Try to acquire a lock

Parameters
int$modeLOCK_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 53 of file DummyLock.php.

◆ destroy()

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

Destroys the resource associated with the lock

Returns
void

Implements TYPO3\CMS\Core\Locking\LockingStrategyInterface.

Definition at line 83 of file DummyLock.php.

◆ getCapabilities()

static 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 27 of file DummyLock.php.

◆ getPriority()

static 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 35 of file DummyLock.php.

◆ isAcquired()

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 73 of file DummyLock.php.

◆ release()

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 63 of file DummyLock.php.