MediaWiki REL1_40
|
External storage in a SQL database. More...
Inherits ExternalStoreMedium.
Public Member Functions | |||||||||
__construct (array $params) | |||||||||
batchFetchFromURLs (array $urls) | |||||||||
Fetch multiple URLs from given external store. | |||||||||
fetchFromURL ( $url) | |||||||||
Fetch data from given external store URL. | |||||||||
getPrimary ( $cluster) | |||||||||
Get a primary database connection for the specified cluster. | |||||||||
getReplica ( $cluster) | |||||||||
Get a replica DB connection for the specified cluster. | |||||||||
getTable ( $db, $cluster=null) | |||||||||
Get the 'blobs' table name for this database. | |||||||||
initializeTable ( $cluster) | |||||||||
Create the appropriate blobs table on this cluster. | |||||||||
isReadOnly ( $location) | |||||||||
Check if a given location is read-only.
| |||||||||
store ( $location, $data) | |||||||||
Insert a data item into a given location.
| |||||||||
Public Member Functions inherited from ExternalStoreMedium | |||||||||
setLogger (LoggerInterface $logger) | |||||||||
Protected Member Functions | |
parseURL ( $url) | |
Additional Inherited Members | |
Protected Attributes inherited from ExternalStoreMedium | |
string | $dbDomain |
Default database domain to store content under. | |
bool | $isDbDomainExplicit |
Whether this was factoried with an explicit DB domain. | |
LoggerInterface | $logger |
array | $params = [] |
Usage context options for this instance. | |
External storage in a SQL database.
In this system, each store "location" maps to a database "cluster". The clusters must be defined in the normal LBFactory configuration.
Definition at line 38 of file ExternalStoreDB.php.
ExternalStoreDB::__construct | ( | array | $params | ) |
array | $params | Additional parameters include:
|
Reimplemented from ExternalStoreMedium.
Definition at line 47 of file ExternalStoreDB.php.
References ExternalStoreMedium\$params.
ExternalStoreDB::batchFetchFromURLs | ( | array | $urls | ) |
Fetch multiple URLs from given external store.
The provided URLs are in the form of DB://cluster/id
, or DB://cluster/id/itemid
for concatenated storage if ConcatenatedGzipHistoryBlob was used.
array | $urls | An array of external store URLs |
Reimplemented from ExternalStoreMedium.
Definition at line 86 of file ExternalStoreDB.php.
References $blob, $res, and parseURL().
ExternalStoreDB::fetchFromURL | ( | $url | ) |
Fetch data from given external store URL.
The provided URL is in the form of DB://cluster/id
or DB://cluster/id/itemid
for concatenated storage if ConcatenatedGzipHistoryBlob was used.
string | $url |
Reimplemented from ExternalStoreMedium.
Definition at line 65 of file ExternalStoreDB.php.
References parseURL().
ExternalStoreDB::getPrimary | ( | $cluster | ) |
Get a primary database connection for the specified cluster.
string | $cluster | Cluster name |
Definition at line 178 of file ExternalStoreDB.php.
References DB_PRIMARY.
Referenced by CgzCopyTransaction\commit(), initializeTable(), and store().
ExternalStoreDB::getReplica | ( | $cluster | ) |
Get a replica DB connection for the specified cluster.
string | $cluster | Cluster name |
Definition at line 160 of file ExternalStoreDB.php.
References DB_REPLICA.
ExternalStoreDB::getTable | ( | $db, | |
$cluster = null ) |
Get the 'blobs' table name for this database.
IDatabase | $db | |
string | null | $cluster | Cluster name |
Definition at line 223 of file ExternalStoreDB.php.
Referenced by initializeTable(), and store().
ExternalStoreDB::initializeTable | ( | $cluster | ) |
Create the appropriate blobs table on this cluster.
string | $cluster |
Definition at line 242 of file ExternalStoreDB.php.
References $IP, getPrimary(), and getTable().
ExternalStoreDB::isReadOnly | ( | $location | ) |
Check if a given location is read-only.
string | $location | The location name |
Reimplemented from ExternalStoreMedium.
Definition at line 135 of file ExternalStoreDB.php.
|
protected |
string | $url |
Definition at line 412 of file ExternalStoreDB.php.
References $path.
Referenced by batchFetchFromURLs(), and fetchFromURL().
ExternalStoreDB::store | ( | $location, | |
$data ) |
Insert a data item into a given location.
string | $location | The location name |
string | $data | The data item |
MWException |
Reimplemented from ExternalStoreMedium.
Definition at line 117 of file ExternalStoreDB.php.
References getPrimary(), and getTable().
Referenced by CgzCopyTransaction\commit().