MediaWiki  master
AtomicSectionUpdate Class Reference

Deferrable Update for closure/callback updates via IDatabase::doAtomicSection() More...

Inheritance diagram for AtomicSectionUpdate:
Collaboration diagram for AtomicSectionUpdate:

Public Member Functions

 __construct (IDatabase $dbw, $fname, callable $callback, array $conns=[])
 
 cancelOnRollback ( $trigger)
 
 doUpdate ()
 Perform the actual work. More...
 
 getOrigin ()
 

Private Attributes

callable null $callback
 
IDatabase $dbw
 
string $fname
 

Detailed Description

Deferrable Update for closure/callback updates via IDatabase::doAtomicSection()

Since
1.27

Definition at line 9 of file AtomicSectionUpdate.php.

Constructor & Destructor Documentation

◆ __construct()

AtomicSectionUpdate::__construct ( IDatabase  $dbw,
  $fname,
callable  $callback,
array  $conns = [] 
)
Parameters
IDatabase$dbwDB handle; update aborts if a transaction now this rolls back
string$fnameCaller name (usually METHOD)
callable$callback
IDatabase[]$connsAbort if a transaction now on one of these rolls back [optional]
See also
IDatabase::doAtomicSection()

Definition at line 24 of file AtomicSectionUpdate.php.

References $callback, $dbw, $fname, and Wikimedia\Rdbms\IDatabase\onTransactionResolution().

Member Function Documentation

◆ cancelOnRollback()

AtomicSectionUpdate::cancelOnRollback (   $trigger)

Definition at line 47 of file AtomicSectionUpdate.php.

◆ doUpdate()

AtomicSectionUpdate::doUpdate ( )

Perform the actual work.

Implements DeferrableUpdate.

Definition at line 37 of file AtomicSectionUpdate.php.

◆ getOrigin()

AtomicSectionUpdate::getOrigin ( )
Returns
string Originating method name

Implements DeferrableCallback.

Definition at line 53 of file AtomicSectionUpdate.php.

References $fname.

Member Data Documentation

◆ $callback

callable null AtomicSectionUpdate::$callback
private

Definition at line 15 of file AtomicSectionUpdate.php.

Referenced by __construct().

◆ $dbw

IDatabase AtomicSectionUpdate::$dbw
private

Definition at line 11 of file AtomicSectionUpdate.php.

Referenced by __construct().

◆ $fname

string AtomicSectionUpdate::$fname
private

Definition at line 13 of file AtomicSectionUpdate.php.

Referenced by __construct(), and getOrigin().


The documentation for this class was generated from the following file: