MediaWiki  REL1_20
ExternalStoreDB Class Reference

DB accessable external objects. More...

List of all members.

Public Member Functions

 __construct ($params=array())
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.
 fetchFromURL ($url)
 Fetch data from given URL.
getLoadBalancer ($cluster)
 Get a LoadBalancer for the specified cluster.
getMaster ($cluster)
 Get a master database connection for the specified cluster.
getSlave ($cluster)
 Get a slave database connection for the specified cluster.
 getTable (&$db)
 Get the 'blobs' table name for this database.
 store ($cluster, $data)
 Insert a data item into a given cluster.

Detailed Description

DB accessable external objects.

Definition at line 27 of file ExternalStoreDB.php.


Constructor & Destructor Documentation

ExternalStoreDB::__construct ( params = array())

Definition at line 29 of file ExternalStoreDB.php.

References $params.


Member Function Documentation

& 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.

Parameters:
$cluster
$id
$itemID
Returns:
mixed
Access:
private

Definition at line 126 of file ExternalStoreDB.php.

References $dbr, false, getMaster(), getSlave(), getTable(), wfDebug(), and wfDebugLog().

Referenced by fetchFromURL().

Fetch data from given URL.

Parameters:
$urlString: an url of the form DB://cluster/id or DB://cluster/id/itemid for concatened storage.
Returns:
mixed

Definition at line 98 of file ExternalStoreDB.php.

References $path, $url, and fetchBlob().

Get a LoadBalancer for the specified cluster.

Parameters:
$clusterString: cluster name
Returns:
LoadBalancer object

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.

Parameters:
$clusterString: cluster name
Returns:
DatabaseBase object

Definition at line 73 of file ExternalStoreDB.php.

References $lb, and getLoadBalancer().

Referenced by fetchBlob(), and store().

& ExternalStoreDB::getSlave ( cluster)

Get a slave database connection for the specified cluster.

Parameters:
$clusterString: cluster name
Returns:
DatabaseBase object

Definition at line 51 of file ExternalStoreDB.php.

References $lb, getLoadBalancer(), and wfDebug().

Referenced by fetchBlob().

Get the 'blobs' table name for this database.

Parameters:
$dbDatabaseBase
Returns:
String: table name ('blobs' by default)

Definition at line 85 of file ExternalStoreDB.php.

Referenced by fetchBlob(), and store().

ExternalStoreDB::store ( cluster,
data 
)

Insert a data item into a given cluster.

Parameters:
$clusterString: the cluster name
$dataString: the data item
Returns:
string URL

Definition at line 170 of file ExternalStoreDB.php.

References getMaster(), and getTable().

Referenced by CompressOld\compressPage().


The documentation for this class was generated from the following file: