MediaWiki 1.43.1
IDatabaseForOwner.php
Go to the documentation of this file.
1<?php
20namespace Wikimedia\Rdbms;
21
31interface IDatabaseForOwner extends IDatabase {
32
50 public function setTransactionListener( $name, ?callable $callback = null );
51
57 public function serverIsReadOnly();
58
66 public function getPrimaryPos();
67
77 public function pendingWriteQueryDuration( $type = self::ESTIMATE_TOTAL );
78
87 public function writesOrCallbacksPending();
88
93 public function writesPending();
94
101 public function pendingWriteCallers();
102
120 public function flushSession( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
121
128 public function lastDoneWrites();
129
140 public function setLBInfo( $nameOrArray, $value = null );
141
159 public function primaryPosWait( DBPrimaryPos $pos, $timeout );
160}
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 the connection may have been used for a write query.
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:48