MediaWiki master
IDatabaseForOwner.php
Go to the documentation of this file.
1<?php
20namespace Wikimedia\Rdbms;
21
31interface IDatabaseForOwner extends IDatabase {
32
51 public function setTransactionListener( $name, ?callable $callback = null );
52
58 public function serverIsReadOnly();
59
67 public function getPrimaryPos();
68
78 public function pendingWriteQueryDuration( $type = self::ESTIMATE_TOTAL );
79
88 public function writesOrCallbacksPending();
89
94 public function writesPending();
95
102 public function pendingWriteCallers();
103
121 public function flushSession( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
122
131 public function lastDoneWrites();
132
143 public function setLBInfo( $nameOrArray, $value = null );
144
162 public function primaryPosWait( DBPrimaryPos $pos, $timeout );
163}
An object representing a primary or replica DB position in a replicated setup.
Internal interface for relational database handles exposed to their owner.
flushSession( $fname=__METHOD__, $flush=self::FLUSHING_ONE)
Release important session-level state (named lock, table locks) as post-rollback cleanup.
pendingWriteQueryDuration( $type=self::ESTIMATE_TOTAL)
Get the time spend running write queries for this transaction.
pendingWriteCallers()
Get the list of method names that did write queries for this transaction.
setLBInfo( $nameOrArray, $value=null)
Set the entire array or a particular key of the managing load balancer info array.
primaryPosWait(DBPrimaryPos $pos, $timeout)
Wait for the replica server to catch up to a given primary server position.
lastDoneWrites()
Get the last time that the connection was used to commit a write.
getPrimaryPos()
Get the replication position of this primary DB server.
setTransactionListener( $name, ?callable $callback=null)
Run a callback after each time any transaction commits or rolls back.
writesOrCallbacksPending()
Whether there is a transaction open with either possible write queries or unresolved pre-commit/commi...
Interface to a relational database.
Definition IDatabase.php:45