Documentation

NullLock
in package
implements LockInterface

Tags
copyright

CiviCRM LLC https://civicrm.org/licensing

Table of Contents

Interfaces

LockInterface
Lock interface.

Properties

$hasLock  : mixed

Methods

acquire()  : bool
Acquire lock.
create()  : static
Create lock.
isAcquired()  : bool
isFree()  : bool|null|string
release()  : bool|null|string
Release lock.

Properties

Methods

acquire()

Acquire lock.

public acquire([int|null $timeout = NULL ]) : bool
Parameters
$timeout : int|null = NULL

The number of seconds to wait to get the lock. For a default value, use NULL.

Return values
bool

create()

Create lock.

public static create(string $name) : static
Parameters
$name : string
Return values
static

isAcquired()

public isAcquired() : bool
Return values
bool

isFree()

public isFree() : bool|null|string

Not supported by some locking strategies. If you need to poll, better to use acquire(0).

Return values
bool|null|string

Trueish/falsish.

release()

Release lock.

public release() : bool|null|string
Return values
bool|null|string

Trueish/falsish.


        
On this page

Search results