MediaWiki REL1_39
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.
 
 getOrigin ()
 

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 Wikimedia\Rdbms\IDatabase\onTransactionResolution().

Member Function Documentation

◆ cancelOnRollback()

AtomicSectionUpdate::cancelOnRollback ( $trigger)
Access: internal
This method is public so that it works with onTransactionResolution()
Parameters
int$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.


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