Wikibase
MediaWiki Wikibase extension
Wikibase\Repo\ChangeModification\DispatchChangeVisibilityNotificationJob Class Reference

Job that propagates changes to the visibility of an article's revisions to clients. More...

+ Inheritance diagram for Wikibase\Repo\ChangeModification\DispatchChangeVisibilityNotificationJob:
+ Collaboration diagram for Wikibase\Repo\ChangeModification\DispatchChangeVisibilityNotificationJob:

Public Member Functions

 __construct (Title $title, array $params=[])
 
- Public Member Functions inherited from Wikibase\Repo\ChangeModification\DispatchChangeModificationNotificationJob
 __construct (string $jobName, Title $title, array $params)
 
 initServices (EntityIdLookup $entityIdLookup, LoggerInterface $logger, JobQueueGroupFactory $jobQueueGroupFactory)
 
 run ()
 

Protected Member Functions

 initFromGlobalState (MediaWikiServices $mwServices)
 
- Protected Member Functions inherited from Wikibase\Repo\ChangeModification\DispatchChangeModificationNotificationJob
 revisionIdentifiersToJson (array $revisionIdentifiers)
 
 getChangeModificationNotificationJobs (EntityId $entityId)
 

Private Member Functions

 getEligibleRevisionIdentifiersById (EntityId $entityId, array $ids)
 Gets the timestamps of all revisions with the given IDs and returns repo revision identifiers for those that are relevant (=> no older than self::clientRCMaxAge). More...
 
 getRevisionAge (string $timestamp)
 
 createJobSpecification (string $revisionIdentifiersJson, int $visibilityBitFlag)
 Returns a new job for updating a client. More...
 

Private Attributes

 $revisionIds
 
 $visibilityChangeMap
 
 $jobBatchSize
 
 $revisionLookup
 

Additional Inherited Members

- Protected Attributes inherited from Wikibase\Repo\ChangeModification\DispatchChangeModificationNotificationJob
 $clientRCMaxAge
 
 $logger
 

Detailed Description

Job that propagates changes to the visibility of an article's revisions to clients.

This job is scheduled by ArticleRevisionVisibilitySetHookHandler and schedules ChangeVisibilityNotification jobs on all client wikis (all as some wikis might no longer be subscribed) which will handle this on the clients.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\ChangeModification\DispatchChangeVisibilityNotificationJob::__construct ( Title  $title,
array  $params = [] 
)

Member Function Documentation

◆ createJobSpecification()

Wikibase\Repo\ChangeModification\DispatchChangeVisibilityNotificationJob::createJobSpecification ( string  $revisionIdentifiersJson,
int  $visibilityBitFlag 
)
private

Returns a new job for updating a client.

Parameters
string$revisionIdentifiersJson
int$visibilityBitFlag
Returns
IJobSpecification

◆ getEligibleRevisionIdentifiersById()

Wikibase\Repo\ChangeModification\DispatchChangeVisibilityNotificationJob::getEligibleRevisionIdentifiersById ( EntityId  $entityId,
array  $ids 
)
private

Gets the timestamps of all revisions with the given IDs and returns repo revision identifiers for those that are relevant (=> no older than self::clientRCMaxAge).

Parameters
EntityId$entityId
int[]$ids
Returns
RepoRevisionIdentifier[] Indexed by revision id

◆ getRevisionAge()

Wikibase\Repo\ChangeModification\DispatchChangeVisibilityNotificationJob::getRevisionAge ( string  $timestamp)
private
Parameters
string$timestamp
Returns
int Age of the revision in seconds

◆ initFromGlobalState()

Wikibase\Repo\ChangeModification\DispatchChangeVisibilityNotificationJob::initFromGlobalState ( MediaWikiServices  $mwServices)
protected

Member Data Documentation

◆ $jobBatchSize

Wikibase\Repo\ChangeModification\DispatchChangeVisibilityNotificationJob::$jobBatchSize
private

◆ $revisionIds

Wikibase\Repo\ChangeModification\DispatchChangeVisibilityNotificationJob::$revisionIds
private

◆ $revisionLookup

Wikibase\Repo\ChangeModification\DispatchChangeVisibilityNotificationJob::$revisionLookup
private

◆ $visibilityChangeMap

Wikibase\Repo\ChangeModification\DispatchChangeVisibilityNotificationJob::$visibilityChangeMap
private

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