ExternalStoreDB Class Reference
[ExternalStorage]

DB accessable external objects. More...

List of all members.

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.


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.


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

Parameters:
$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.

Parameters:
$cluster String: 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:
$cluster String: cluster name
Returns:
DatabaseBase object

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.

Parameters:
$cluster String: cluster name
Returns:
DatabaseBase object

Definition at line 51 of file ExternalStoreDB.php.

References getLoadBalancer().

Referenced by fetchBlob().

ExternalStoreDB::getTable ( &$  db  ) 

Get the 'blobs' table name for this database.

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

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.

Parameters:
$cluster String: the cluster name
$data String: the data item
Returns:
string URL

Definition at line 152 of file ExternalStoreDB.php.

References $dbw, getMaster(), and getTable().


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

Generated on Sat Apr 30 22:57:37 2011 for MediaWiki by  doxygen 1.5.9