Wikibase
MediaWiki Wikibase extension
Wikibase\Client\Changes\WikiPageUpdater Class Reference

Service object for triggering different kinds of page updates and generally notifying the local wiki of external changes. More...

+ Inheritance diagram for Wikibase\Client\Changes\WikiPageUpdater:
+ Collaboration diagram for Wikibase\Client\Changes\WikiPageUpdater:

Public Member Functions

 __construct (JobQueueGroup $jobQueueGroup, LoggerInterface $logger, StatsdDataFactoryInterface $stats=null)
 
 setPurgeCacheBatchSize ( $purgeCacheBatchSize)
 
 setRecentChangesBatchSize ( $rcBatchSize)
 
 scheduleRefreshLinks (array $titles, array $rootJobParams, $causeAction, $causeAgent)
 Schedules RefreshLinks jobs for the given titles. More...
 
- Public Member Functions inherited from Wikibase\Client\Changes\PageUpdater
 purgeWebCache (array $titles, array $rootJobParams, $causeAction, $causeAgent)
 Invalidates external web cached of the given pages. More...
 
 injectRCRecords (array $titles, EntityChange $change, array $rootJobParams=[])
 Injects an RC entry into the recentchanges, using the given title and attribs. More...
 

Private Member Functions

 incrementStats ( $updateType, $delta)
 
 buildJobParams (array $titles, array $rootJobParams)
 
 getPageParamForRefreshLinksJob (array $titles)
 

Private Attributes

 $jobQueueGroup
 
 $logger
 
 $purgeCacheBatchSize = 300
 
 $rcBatchSize = 300
 
 $stats
 

Detailed Description

Service object for triggering different kinds of page updates and generally notifying the local wiki of external changes.

Used by ChangeHandler as an interface to the local wiki.

Author
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Client\Changes\WikiPageUpdater::__construct ( JobQueueGroup  $jobQueueGroup,
LoggerInterface  $logger,
StatsdDataFactoryInterface  $stats = null 
)
Parameters
JobQueueGroup$jobQueueGroup
LoggerInterface$logger
StatsdDataFactoryInterface | null$stats

Member Function Documentation

◆ buildJobParams()

Wikibase\Client\Changes\WikiPageUpdater::buildJobParams ( array  $titles,
array  $rootJobParams 
)
private
Parameters
Title[]$titles
array$rootJobParams
Returns
array
See also
JobQueueChangeNotificationSender::getJobSpecification for relevant root job parameters.

◆ getPageParamForRefreshLinksJob()

Wikibase\Client\Changes\WikiPageUpdater::getPageParamForRefreshLinksJob ( array  $titles)
private
Parameters
Title[]$titles
Returns
array[] string $pageId => [ int $namespace, string $dbKey ]
See also
ChangeHandler::getTitleBatchSignature

◆ incrementStats()

Wikibase\Client\Changes\WikiPageUpdater::incrementStats (   $updateType,
  $delta 
)
private
Parameters
string$updateType
int$delta

◆ scheduleRefreshLinks()

Wikibase\Client\Changes\WikiPageUpdater::scheduleRefreshLinks ( array  $titles,
array  $rootJobParams,
  $causeAction,
  $causeAgent 
)

Schedules RefreshLinks jobs for the given titles.

Parameters
Title[]$titlesThe Titles of the pages to update
array$rootJobParams
string$causeActionTriggering action
string$causeAgentTriggering agent

Implements Wikibase\Client\Changes\PageUpdater.

◆ setPurgeCacheBatchSize()

Wikibase\Client\Changes\WikiPageUpdater::setPurgeCacheBatchSize (   $purgeCacheBatchSize)
Parameters
int$purgeCacheBatchSize

◆ setRecentChangesBatchSize()

Wikibase\Client\Changes\WikiPageUpdater::setRecentChangesBatchSize (   $rcBatchSize)
Parameters
int$rcBatchSize

Member Data Documentation

◆ $jobQueueGroup

Wikibase\Client\Changes\WikiPageUpdater::$jobQueueGroup
private

◆ $logger

Wikibase\Client\Changes\WikiPageUpdater::$logger
private

◆ $purgeCacheBatchSize

Wikibase\Client\Changes\WikiPageUpdater::$purgeCacheBatchSize = 300
private

◆ $rcBatchSize

Wikibase\Client\Changes\WikiPageUpdater::$rcBatchSize = 300
private

◆ $stats

Wikibase\Client\Changes\WikiPageUpdater::$stats
private

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