MediaWiki  REL1_19
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 7 of file ExternalStoreDB.php.


Constructor & Destructor Documentation

ExternalStoreDB::__construct ( params = array())

Definition at line 9 of file ExternalStoreDB.php.


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 105 of file ExternalStoreDB.php.

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

Referenced by fetchFromURL().

Here is the call graph for this function:

Here is the caller graph for this function:

Fetch data from given URL.

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

Definition at line 77 of file ExternalStoreDB.php.

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

Here is the call graph for this function:

Get a LoadBalancer for the specified cluster.

Parameters:
$clusterString: cluster name
Returns:
LoadBalancer object

Definition at line 19 of file ExternalStoreDB.php.

References wfGetLBFactory().

Referenced by getMaster(), and getSlave().

Here is the call graph for this function:

Here is the caller graph for this function:

& ExternalStoreDB::getMaster ( cluster)

Get a master database connection for the specified cluster.

Parameters:
$clusterString: cluster name
Returns:
DatabaseBase object

Definition at line 53 of file ExternalStoreDB.php.

References $lb, and getLoadBalancer().

Referenced by fetchBlob(), and store().

Here is the call graph for this function:

Here is the caller graph for this function:

& ExternalStoreDB::getSlave ( cluster)

Get a slave database connection for the specified cluster.

Parameters:
$clusterString: cluster name
Returns:
DatabaseBase object

Definition at line 31 of file ExternalStoreDB.php.

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

Referenced by fetchBlob().

Here is the call graph for this function:

Here is the caller graph for this function:

Get the 'blobs' table name for this database.

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

Definition at line 65 of file ExternalStoreDB.php.

Referenced by fetchBlob(), and store().

Here is the caller graph for this function:

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 149 of file ExternalStoreDB.php.

References getMaster(), and getTable().

Referenced by CompressOld\compressPage().

Here is the call graph for this function:

Here is the caller graph for this function:


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