Movatterモバイル変換


[0]ホーム

URL:


MediaWiki master
ILoadBalancer.php
Go to the documentation of this file.
1<?php
6namespaceWikimedia\Rdbms;
7
99interfaceILoadBalancer {
103publicconstDB_REPLICA = -1;
109publicconstDB_PRIMARY = -2;
110
112publicconstDOMAIN_ANY ='';
114publicconstGROUP_GENERIC ='';
115
117publicconstCONN_TRX_AUTOCOMMIT = 1;
122publicconstCONN_UNTRACKED_GAUGE = 2;
127publicconstCONN_SILENCE_ERRORS = 4;
128
147publicfunctiongetClusterName(): string;
148
156publicfunctiongetLocalDomainID(): string;
157
163publicfunctionresolveDomainID(DatabaseDomain|string|false $domain ): string;
164
175publicfunctionsetTempTablesOnlyMode( $value, $domain );
176
190publicfunctiongetReaderIndex( $group =false );
191
236publicfunctiongetConnection( $i, $groups = [],string|false $domain =false, $flags = 0 );
237
258publicfunctiongetServerConnection( $i, $domain, $flags = 0 );
259
268publicfunctiongetConnectionInternal( $i, $groups = [], $domain =false, $flags = 0 ):IDatabase;
269
288publicfunctiongetMaintenanceConnectionRef( $i, $groups = [], $domain =false, $flags = 0 ):DBConnRef;
289
295publicfunctiongetServerCount();
296
309publicfunctionhasReplicaServers();
310
327publicfunctionhasStreamingReplicaServers();
328
335publicfunctiongetServerName( $i ): string;
336
344publicfunctiongetServerInfo( $i );
345
353publicfunctiongetServerType( $i );
354
362publicfunctiongetServerAttributes( $i );
363
371publicfunctiongetPrimaryPos();
372
378publicfunctionhasPrimaryChanges();
379
386publicfunctionexplicitTrxActive();
387
396publicfunctionhasOrMadeRecentPrimaryChanges( $age =null );
397
402publicfunctiongetReadOnlyReason();
403
407publicfunctionpingAll();
408
418publicfunctiongetMaxLag();
419
429publicfunctiongetLagTimes();
430
442publicfunctionwaitForPrimaryPos(IDatabase $conn );
443
452publicfunctionsetTransactionListener( $name, ?callable $callback =null );
453
466publicfunctionsetTableAliases( array $aliases );
467
476publicfunctionsetDomainAliases( array $aliases );
477}
Wikimedia\Rdbms\DBConnRef
Helper class used for automatically re-using IDatabase connections and lazily establishing the actual...
DefinitionDBConnRef.php:37
Wikimedia\Rdbms\DatabaseDomain
Class to handle database/schema/prefix specifications for IDatabase.
DefinitionDatabaseDomain.php:28
Wikimedia\Rdbms\IDatabase
Interface to a relational database.
DefinitionIDatabase.php:31
Wikimedia\Rdbms\ILoadBalancer
This class is a delegate to ILBFactory for a given database cluster.
DefinitionILoadBalancer.php:99
Wikimedia\Rdbms\ILoadBalancer\getClusterName
getClusterName()
Get the name of the overall cluster of database servers managing the dataset.
Wikimedia\Rdbms\ILoadBalancer\getMaxLag
getMaxLag()
Get the name and lag time of the most-lagged replica server.
Wikimedia\Rdbms\ILoadBalancer\CONN_UNTRACKED_GAUGE
const CONN_UNTRACKED_GAUGE
Yield an untracked, low-timeout, autocommit-mode handle (to gauge server health)
DefinitionILoadBalancer.php:122
Wikimedia\Rdbms\ILoadBalancer\hasOrMadeRecentPrimaryChanges
hasOrMadeRecentPrimaryChanges( $age=null)
Check if this load balancer object had any recent or still pending writes issued against it by this P...
Wikimedia\Rdbms\ILoadBalancer\getLagTimes
getLagTimes()
Get an estimate of replication lag (in seconds) for each server.
Wikimedia\Rdbms\ILoadBalancer\getServerType
getServerType( $i)
Get the RDBMS type of the server with the specified index (e.g.
Wikimedia\Rdbms\ILoadBalancer\GROUP_GENERIC
const GROUP_GENERIC
The generic query group.
DefinitionILoadBalancer.php:114
Wikimedia\Rdbms\ILoadBalancer\getServerConnection
getServerConnection( $i, $domain, $flags=0)
Get a DB handle for a specific server index.
Wikimedia\Rdbms\ILoadBalancer\getReaderIndex
getReaderIndex( $group=false)
Get the specific server index of the reader connection for a given group.
Wikimedia\Rdbms\ILoadBalancer\resolveDomainID
resolveDomainID(DatabaseDomain|string|false $domain)
Wikimedia\Rdbms\ILoadBalancer\DOMAIN_ANY
const DOMAIN_ANY
Domain specifier when no specific database needs to be selected.
DefinitionILoadBalancer.php:112
Wikimedia\Rdbms\ILoadBalancer\DB_REPLICA
const DB_REPLICA
Request a replica DB connection.
DefinitionILoadBalancer.php:103
Wikimedia\Rdbms\ILoadBalancer\CONN_TRX_AUTOCOMMIT
const CONN_TRX_AUTOCOMMIT
Yield a tracked autocommit-mode handle (reuse existing ones)
DefinitionILoadBalancer.php:117
Wikimedia\Rdbms\ILoadBalancer\setTableAliases
setTableAliases(array $aliases)
Make certain table names use their own database, schema, and table prefix when passed into SQL querie...
Wikimedia\Rdbms\ILoadBalancer\CONN_SILENCE_ERRORS
const CONN_SILENCE_ERRORS
Yield null on connection failure instead of throwing an exception.
DefinitionILoadBalancer.php:127
Wikimedia\Rdbms\ILoadBalancer\setTempTablesOnlyMode
setTempTablesOnlyMode( $value, $domain)
Indicate whether the tables on this domain are only temporary tables for testing.
Wikimedia\Rdbms\ILoadBalancer\setDomainAliases
setDomainAliases(array $aliases)
Convert certain database domains to alternative ones.
Wikimedia\Rdbms\ILoadBalancer\getServerCount
getServerCount()
Get the number of servers defined in configuration.
Wikimedia\Rdbms\ILoadBalancer\getLocalDomainID
getLocalDomainID()
Get the local (and default) database domain ID of connection handles.
Wikimedia\Rdbms\ILoadBalancer\getServerInfo
getServerInfo( $i)
Return the server configuration map for the server with the specified index.
Wikimedia\Rdbms\ILoadBalancer\waitForPrimaryPos
waitForPrimaryPos(IDatabase $conn)
Wait for a replica DB to reach a specified primary position.
Wikimedia\Rdbms\ILoadBalancer\setTransactionListener
setTransactionListener( $name, ?callable $callback=null)
Set a callback via IDatabase::setTransactionListener() on all current and future primary connections ...
Wikimedia\Rdbms\ILoadBalancer\hasPrimaryChanges
hasPrimaryChanges()
Whether there are pending changes or callbacks in a transaction by this thread.
Wikimedia\Rdbms\ILoadBalancer\getPrimaryPos
getPrimaryPos()
Get the current primary replication position.
Wikimedia\Rdbms\ILoadBalancer\getConnection
getConnection( $i, $groups=[], string|false $domain=false, $flags=0)
Get a lazy-connecting database handle for a specific or virtual (DB_PRIMARY/DB_REPLICA) server index.
Wikimedia\Rdbms\ILoadBalancer\getMaintenanceConnectionRef
getMaintenanceConnectionRef( $i, $groups=[], $domain=false, $flags=0)
Get a DB handle, suitable for migrations and schema changes, for a server index.
Wikimedia\Rdbms\ILoadBalancer\explicitTrxActive
explicitTrxActive()
Determine whether an explicit transaction is active on any open primary connection.
Wikimedia\Rdbms\ILoadBalancer\getReadOnlyReason
getReadOnlyReason()
Wikimedia\Rdbms\ILoadBalancer\DB_PRIMARY
const DB_PRIMARY
Request a primary, write-enabled DB connection.
DefinitionILoadBalancer.php:109
Wikimedia\Rdbms\ILoadBalancer\getConnectionInternal
getConnectionInternal( $i, $groups=[], $domain=false, $flags=0)
Wikimedia\Rdbms\ILoadBalancer\hasReplicaServers
hasReplicaServers()
Whether there are any replica servers configured.
Wikimedia\Rdbms\ILoadBalancer\hasStreamingReplicaServers
hasStreamingReplicaServers()
Whether any replica servers use streaming replication from the primary server.
Wikimedia\Rdbms\ILoadBalancer\pingAll
pingAll()
Wikimedia\Rdbms\ILoadBalancer\getServerName
getServerName( $i)
Get the readable name of the server with the specified index.
Wikimedia\Rdbms\ILoadBalancer\getServerAttributes
getServerAttributes( $i)
Get basic attributes of the server with the specified index without connecting.
Wikimedia\Rdbms
DefinitionChangedTablesTracker.php:3

[8]ページ先頭

©2009-2025 Movatter.jp