MediaWiki  master
RefreshSecondaryDataUpdate Class Reference

Update object handling the cleanup of secondary data after a page was edited. More...

Inheritance diagram for RefreshSecondaryDataUpdate:
Collaboration diagram for RefreshSecondaryDataUpdate:

Public Member Functions

 __construct (ILBFactory $lbFactory, User $user, WikiPage $page, RevisionRecord $revisionRecord, DerivedPageDataUpdater $updater, array $options)
 
 doUpdate ()
 Perform the actual work. More...
 
 getAsJobSpecification ()
 
 getTransactionRoundRequirement ()
 
- Public Member Functions inherited from DataUpdate
 __construct ()
 Stable to call. More...
 
 getCauseAction ()
 
 getCauseAgent ()
 
 setCause ( $action, $user)
 
 setTransactionTicket ( $ticket)
 

Private Attributes

ILBFactory $lbFactory
 
WikiPage $page
 
bool $recursive
 
RevisionRecord null $revisionRecord
 
DerivedPageDataUpdater $updater
 
User null $user
 

Additional Inherited Members

- Static Public Member Functions inherited from DataUpdate
static runUpdates (array $updates)
 Convenience method, calls doUpdate() on every DataUpdate in the array. More...
 
- Protected Attributes inherited from DataUpdate
string $causeAction = 'unknown'
 Short update cause action description. More...
 
string $causeAgent = 'unknown'
 Short update cause user description. More...
 
mixed $ticket
 Result from LBFactory::getEmptyTransactionTicket() More...
 

Detailed Description

Update object handling the cleanup of secondary data after a page was edited.

This makes makes it possible for DeferredUpdates to have retry logic using a single refreshLinks job if any of the bundled updates fail.

Since
1.34

Definition at line 35 of file RefreshSecondaryDataUpdate.php.

Constructor & Destructor Documentation

◆ __construct()

RefreshSecondaryDataUpdate::__construct ( ILBFactory  $lbFactory,
User  $user,
WikiPage  $page,
RevisionRecord  $revisionRecord,
DerivedPageDataUpdater  $updater,
array  $options 
)
Parameters
ILBFactory$lbFactory
User$user
WikiPage$pagePage we are updating
RevisionRecord$revisionRecord
DerivedPageDataUpdater$updater
array$optionsOptions map; supports "recursive"

Definition at line 60 of file RefreshSecondaryDataUpdate.php.

References $lbFactory, $page, $revisionRecord, $updater, and $user.

Member Function Documentation

◆ doUpdate()

RefreshSecondaryDataUpdate::doUpdate ( )

Perform the actual work.

Implements DeferrableUpdate.

Definition at line 82 of file RefreshSecondaryDataUpdate.php.

References DeferredUpdates\attemptUpdate(), and MWExceptionHandler\rollbackMasterChangesAndLog().

◆ getAsJobSpecification()

RefreshSecondaryDataUpdate::getAsJobSpecification ( )
Returns
array (domain => DB domain ID, job => IJobSpecification)

Implements EnqueueableDataUpdate.

Definition at line 113 of file RefreshSecondaryDataUpdate.php.

◆ getTransactionRoundRequirement()

RefreshSecondaryDataUpdate::getTransactionRoundRequirement ( )
Returns
int One of the class TRX_ROUND_* constants

Implements TransactionRoundAwareUpdate.

Definition at line 78 of file RefreshSecondaryDataUpdate.php.

Member Data Documentation

◆ $lbFactory

ILBFactory RefreshSecondaryDataUpdate::$lbFactory
private

Definition at line 39 of file RefreshSecondaryDataUpdate.php.

Referenced by __construct().

◆ $page

WikiPage RefreshSecondaryDataUpdate::$page
private

Definition at line 41 of file RefreshSecondaryDataUpdate.php.

Referenced by __construct().

◆ $recursive

bool RefreshSecondaryDataUpdate::$recursive
private

Definition at line 45 of file RefreshSecondaryDataUpdate.php.

◆ $revisionRecord

RevisionRecord null RefreshSecondaryDataUpdate::$revisionRecord
private

Definition at line 48 of file RefreshSecondaryDataUpdate.php.

Referenced by __construct().

◆ $updater

DerivedPageDataUpdater RefreshSecondaryDataUpdate::$updater
private

Definition at line 43 of file RefreshSecondaryDataUpdate.php.

Referenced by __construct().

◆ $user

User null RefreshSecondaryDataUpdate::$user
private

Definition at line 50 of file RefreshSecondaryDataUpdate.php.

Referenced by __construct().


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