MediaWiki master
MediaWiki\Deferred\AtomicSectionUpdate Class Reference

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

Inherits MediaWiki\Deferred\DeferrableUpdate, and MediaWiki\Deferred\DeferrableCallback.

Collaboration diagram for MediaWiki\Deferred\AtomicSectionUpdate:

Public Member Functions

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

Detailed Description

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

Since
1.27

Definition at line 11 of file AtomicSectionUpdate.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Deferred\AtomicSectionUpdate::__construct ( IDatabase $dbw,
$fname,
callable $callback,
array $conns = [] )
See also
IDatabase::doAtomicSection()
Parameters
IDatabase$dbwDB handle; update aborts if a transaction now this rolls back
string$fnameCaller name (usually METHOD)
callable$callback
IDatabase[]$connsCancel the update if a DB transaction is rolled back [optional]

Definition at line 26 of file AtomicSectionUpdate.php.

References Wikimedia\Rdbms\IDatabase\onTransactionResolution().

Member Function Documentation

◆ cancelOnRollback()

MediaWiki\Deferred\AtomicSectionUpdate::cancelOnRollback ( $trigger)
Access: internal
This method is public so that it works with onTransactionResolution()
Parameters
int$trigger

Definition at line 49 of file AtomicSectionUpdate.php.

◆ doUpdate()

MediaWiki\Deferred\AtomicSectionUpdate::doUpdate ( )

Perform the actual work.

Implements MediaWiki\Deferred\DeferrableUpdate.

Definition at line 39 of file AtomicSectionUpdate.php.

◆ getOrigin()

MediaWiki\Deferred\AtomicSectionUpdate::getOrigin ( )
Returns
string Originating method name

Implements MediaWiki\Deferred\DeferrableCallback.

Definition at line 55 of file AtomicSectionUpdate.php.


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