MediaWiki REL1_40
ILoadBalancerForOwner.php
Go to the documentation of this file.
1<?php
20namespace Wikimedia\Rdbms;
21
22use Exception;
23
35 public const STAGE_POSTCOMMIT_CALLBACKS = 'stage-postcommit-callbacks';
37 public const STAGE_POSTROLLBACK_CALLBACKS = 'stage-postrollback-callbacks';
38
73 public function __construct( array $params );
74
82 public function disable( $fname = __METHOD__ );
83
90 public function closeAll( $fname = __METHOD__ );
91
101 public function finalizePrimaryChanges( $fname = __METHOD__ );
102
113 public function approvePrimaryChanges( int $maxWriteDuration, $fname = __METHOD__ );
114
127 public function beginPrimaryChanges( $fname = __METHOD__ );
128
135 public function commitPrimaryChanges( $fname = __METHOD__ );
136
144 public function runPrimaryTransactionIdleCallbacks( $fname = __METHOD__ );
145
153 public function runPrimaryTransactionListenerCallbacks( $fname = __METHOD__ );
154
162 public function rollbackPrimaryChanges( $fname = __METHOD__ );
163
173 public function flushPrimarySessions( $fname = __METHOD__ );
174
180 public function flushReplicaSnapshots( $fname = __METHOD__ );
181
190 public function flushPrimarySnapshots( $fname = __METHOD__ );
191
199
206 public function setLocalDomainPrefix( $prefix );
207
220 public function reconfigure( array $conf );
221}
Internal interface for LoadBalancer methods used by LBFactory.
flushPrimarySnapshots( $fname=__METHOD__)
Commit all primary DB transactions so as to flush any REPEATABLE-READ or SSI snapshots.
beginPrimaryChanges( $fname=__METHOD__)
Flush any primary transaction snapshots and set DBO_TRX (if DBO_DEFAULT is set)
pendingPrimaryChangeCallers()
Get the list of callers that have pending primary changes.
setLocalDomainPrefix( $prefix)
Set a new table prefix for the existing local domain ID for testing.
flushPrimarySessions( $fname=__METHOD__)
Release/destroy session-level named locks, table locks, and temp tables.
reconfigure(array $conf)
Reconfigure using the given config array.
commitPrimaryChanges( $fname=__METHOD__)
Issue COMMIT on all open primary connections to flush changes and view snapshots.
finalizePrimaryChanges( $fname=__METHOD__)
Run pre-commit callbacks and defer execution of post-commit callbacks.
const STAGE_POSTROLLBACK_CALLBACKS
Manager of ILoadBalancer instances is running post-rollback callbacks.
runPrimaryTransactionListenerCallbacks( $fname=__METHOD__)
Run all recurring post-COMMIT/ROLLBACK listener callbacks.
closeAll( $fname=__METHOD__)
Close all open connections.
approvePrimaryChanges(int $maxWriteDuration, $fname=__METHOD__)
Perform all pre-commit checks for things like replication safety.
rollbackPrimaryChanges( $fname=__METHOD__)
Issue ROLLBACK only on primary, only if queries were done on connection.
disable( $fname=__METHOD__)
Close all connections and disable this load balancer.
flushReplicaSnapshots( $fname=__METHOD__)
Commit all replica DB transactions so as to flush any REPEATABLE-READ or SSI snapshots.
const STAGE_POSTCOMMIT_CALLBACKS
Manager of ILoadBalancer instances is running post-commit callbacks.
runPrimaryTransactionIdleCallbacks( $fname=__METHOD__)
Consume and run all pending post-COMMIT/ROLLBACK callbacks and commit dangling transactions.
This class is a delegate to ILBFactory for a given database cluster.