MediaWiki master
IDatabaseForOwner.php
Go to the documentation of this file.
1<?php
20namespace Wikimedia\Rdbms;
21
28interface IDatabaseForOwner extends IDatabase {
29
47 public function setTransactionListener( $name, callable $callback = null );
48
54 public function serverIsReadOnly();
55
63 public function getPrimaryPos();
64
74 public function pendingWriteQueryDuration( $type = self::ESTIMATE_TOTAL );
75
84 public function writesOrCallbacksPending();
85
90 public function writesPending();
91
98 public function pendingWriteCallers();
99
117 public function flushSession( $fname = __METHOD__, $flush = self::FLUSHING_ONE );
118
125 public function lastDoneWrites();
126
137 public function setLBInfo( $nameOrArray, $value = null );
138
156 public function primaryPosWait( DBPrimaryPos $pos, $timeout );
157}
An object representing a primary or replica DB position in a replicated setup.
Internal interface between a database object and load balancer.
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...
Basic database interface for live and lazy-loaded relation database handles.
Definition IDatabase.php:39