Public Member Functions | |
__construct ($params=array()) | |
& | getLoadBalancer ($cluster) |
Get a LoadBalancer for the specified cluster. | |
& | getSlave ($cluster) |
Get a slave database connection for the specified cluster. | |
& | getMaster ($cluster) |
Get a master database connection for the specified cluster. | |
getTable (&$db) | |
Get the 'blobs' table name for this database. | |
fetchFromURL ($url) | |
Fetch data from given URL. | |
& | fetchBlob ($cluster, $id, $itemID) |
Fetch a blob item out of the database; a cache of the last-loaded blob will be kept so that multiple loads out of a multi-item blob can avoid redundant database access and decompression. | |
store ($cluster, $data) | |
Insert a data item into a given cluster. |
Definition at line 27 of file ExternalStoreDB.php.
ExternalStoreDB::__construct | ( | $ | params = array() |
) |
Definition at line 29 of file ExternalStoreDB.php.
& ExternalStoreDB::fetchBlob | ( | $ | cluster, | |
$ | id, | |||
$ | itemID | |||
) |
Fetch a blob item out of the database; a cache of the last-loaded blob will be kept so that multiple loads out of a multi-item blob can avoid redundant database access and decompression.
$cluster | ||
$id | ||
$itemID |
Definition at line 115 of file ExternalStoreDB.php.
References $dbr, $dbw, $wgExternalBlobCache, getMaster(), getSlave(), getTable(), wfDebug(), and wfDebugLog().
Referenced by fetchFromURL().
ExternalStoreDB::fetchFromURL | ( | $ | url | ) |
Fetch data from given URL.
$url | String: an url of the form DB://cluster/id or DB://cluster/id/itemid for concatened storage. |
Definition at line 87 of file ExternalStoreDB.php.
References $path, $url, and fetchBlob().
& ExternalStoreDB::getLoadBalancer | ( | $ | cluster | ) |
Get a LoadBalancer for the specified cluster.
$cluster | String: cluster name |
Definition at line 39 of file ExternalStoreDB.php.
References wfGetLBFactory().
Referenced by getMaster(), and getSlave().
& ExternalStoreDB::getMaster | ( | $ | cluster | ) |
Get a master database connection for the specified cluster.
$cluster | String: cluster name |
Definition at line 63 of file ExternalStoreDB.php.
References getLoadBalancer().
Referenced by fetchBlob(), and store().
& ExternalStoreDB::getSlave | ( | $ | cluster | ) |
Get a slave database connection for the specified cluster.
$cluster | String: cluster name |
Definition at line 51 of file ExternalStoreDB.php.
References getLoadBalancer().
Referenced by fetchBlob().
ExternalStoreDB::getTable | ( | &$ | db | ) |
Get the 'blobs' table name for this database.
$db | DatabaseBase |
Definition at line 75 of file ExternalStoreDB.php.
Referenced by fetchBlob(), and store().
ExternalStoreDB::store | ( | $ | cluster, | |
$ | data | |||
) |
Insert a data item into a given cluster.
$cluster | String: the cluster name | |
$data | String: the data item |
Definition at line 152 of file ExternalStoreDB.php.
References $dbw, getMaster(), and getTable().