MediaWiki REL1_40
|
Class for handling updates to the site_stats table. More...
Inherits DeferrableUpdate, and MergeableUpdate.
Public Member Functions | |
__construct ( $views, $edits, $good, $pages=0, $users=0) | |
doUpdate () | |
Perform the actual work. | |
merge (MergeableUpdate $update) | |
Merge this enqueued update with a new MergeableUpdate of the same qualified class name. | |
Static Public Member Functions | |
static | cacheUpdate (IDatabase $dbw) |
static | factory (array $deltas) |
Public Attributes | |
const | SHARDS_ON = 10 |
Protected Attributes | |
int | $articles = 0 |
int | $edits = 0 |
int | $images = 0 |
int | $pages = 0 |
int | $users = 0 |
Class for handling updates to the site_stats table.
Definition at line 28 of file SiteStatsUpdate.php.
SiteStatsUpdate::__construct | ( | $views, | |
$edits, | |||
$good, | |||
$pages = 0, | |||
$users = 0 ) |
Definition at line 55 of file SiteStatsUpdate.php.
|
static |
IDatabase | $dbw |
Definition at line 170 of file SiteStatsUpdate.php.
References $dbr, DB_REPLICA, RC_EXTERNAL, SiteStats\unload(), and Wikimedia\Rdbms\IDatabase\update().
SiteStatsUpdate::doUpdate | ( | ) |
Perform the actual work.
Implements DeferrableUpdate.
Definition at line 101 of file SiteStatsUpdate.php.
References $type, Wikimedia\Rdbms\Platform\ISQLPlatform\addIdentifierQuotes(), Wikimedia\Rdbms\Platform\ISQLPlatform\buildGreatest(), DB_PRIMARY, SiteStats\unload(), Wikimedia\Rdbms\IDatabase\update(), and Wikimedia\Rdbms\IDatabase\upsert().
|
static |
int[] | $deltas | Map of (counter type => integer delta) e.g. SiteStatsUpdate::factory( [ 'edits' => 10, 'articles' => 2, 'pages' => 7, 'users' => 5, ] ); |
UnexpectedValueException |
Definition at line 85 of file SiteStatsUpdate.php.
SiteStatsUpdate::merge | ( | MergeableUpdate | $update | ) |
Merge this enqueued update with a new MergeableUpdate of the same qualified class name.
MergeableUpdate | $update | The new update (having the same class) |
Implements MergeableUpdate.
Definition at line 62 of file SiteStatsUpdate.php.
|
protected |
Definition at line 34 of file SiteStatsUpdate.php.
|
protected |
Definition at line 30 of file SiteStatsUpdate.php.
|
protected |
Definition at line 38 of file SiteStatsUpdate.php.
|
protected |
Definition at line 32 of file SiteStatsUpdate.php.
|
protected |
Definition at line 36 of file SiteStatsUpdate.php.
const SiteStatsUpdate::SHARDS_ON = 10 |
Definition at line 41 of file SiteStatsUpdate.php.