79 public function write( array $updates ) {
80 $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
81 $ticket = $lbFactory->getEmptyTransactionTicket( __METHOD__ );
84 if ( (
string)$this->caller !==
'' ) {
85 $caller .=
" (for {$this->caller})";
88 foreach ( $updates as $update ) {
92 $update[
'primaryKey'],
97 $lbFactory->commitAndWaitForReplication( __METHOD__, $ticket );
string null $caller
For debugging which method is using this class.
__construct(IDatabase $db, $table, $clusterName=false)
setCaller( $caller)
Use ->setCaller( METHOD ) to indicate which code is using this class.
string false $clusterName
A cluster name valid for use with LBFactory.
IDatabase $db
The database to write to.
string $table
The name of the table to update.