MediaWiki master
IDatabaseForOwner.php
Go to the documentation of this file.
1<?php
6namespace Wikimedia\Rdbms;
7
17interface IDatabaseForOwner extends IDatabase {
18
37 public function setTransactionListener( $name, ?callable $callback = null );
38
44 public function serverIsReadOnly();
45
53 public function getPrimaryPos();
54
64 public function pendingWriteQueryDuration( $type = self::ESTIMATE_TOTAL );
65
74 public function writesOrCallbacksPending();
75
80 public function writesPending();
81
88 public function pendingWriteCallers();
89
107 public function flushSession( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
108
117 public function lastDoneWrites();
118
129 public function setLBInfo( $nameOrArray, $value = null );
130
148 public function primaryPosWait( DBPrimaryPos $pos, $timeout );
149}
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:31