MediaWiki  1.33.0
Revision\RevisionStoreFactory Class Reference

Factory service for RevisionStore instances. More...

Collaboration diagram for Revision\RevisionStoreFactory:

Public Member Functions

 __construct (ILBFactory $dbLoadBalancerFactory, BlobStoreFactory $blobStoreFactory, NameTableStoreFactory $nameTables, SlotRoleRegistry $slotRoleRegistry, WANObjectCache $cache, CommentStore $commentStore, ActorMigration $actorMigration, $migrationStage, LoggerSpi $loggerProvider, $contentHandlerUseDB)
 
 getRevisionStore ( $wikiId=false)
 

Private Attributes

ActorMigration $actorMigration
 
BlobStoreFactory $blobStoreFactory
 
WANObjectCache $cache
 
CommentStore $commentStore
 
bool $contentHandlerUseDB
 
ILBFactory $dbLoadBalancerFactory
 
LoggerSpi $loggerProvider
 
int $mcrMigrationStage
 One of the MIGRATION_* constants. More...
 
NameTableStoreFactory $nameTables
 
SlotRoleRegistry $slotRoleRegistry
 

Detailed Description

Factory service for RevisionStore instances.

This allows RevisionStores to be created for cross-wiki access.

Warning
Beware compatibility issues with schema migration in the context of cross-wiki access! This class assumes that all wikis are at compatible migration stages for all relevant schemas. Relevant schemas are: revision storage (MCR), the revision comment table, and the actor table. Migration stages are compatible as long as a) there are no wikis in the cluster that only write the old schema or b) there are no wikis that read only the new schema.
Since
1.32

Definition at line 49 of file RevisionStoreFactory.php.

Constructor & Destructor Documentation

◆ __construct()

Revision\RevisionStoreFactory::__construct ( ILBFactory  $dbLoadBalancerFactory,
BlobStoreFactory  $blobStoreFactory,
NameTableStoreFactory  $nameTables,
SlotRoleRegistry  $slotRoleRegistry,
WANObjectCache  $cache,
CommentStore  $commentStore,
ActorMigration  $actorMigration,
  $migrationStage,
LoggerSpi  $loggerProvider,
  $contentHandlerUseDB 
)
Parameters
ILBFactory$dbLoadBalancerFactory
BlobStoreFactory$blobStoreFactory
NameTableStoreFactory$nameTables
SlotRoleRegistry$slotRoleRegistry
WANObjectCache$cache
CommentStore$commentStore
ActorMigration$actorMigration
int$migrationStage
LoggerSpi$loggerProvider
bool$contentHandlerUseDBsee $wgContentHandlerUseDB. Must be the same for all wikis in the cluster. Will go away after MCR migration.

Definition at line 91 of file RevisionStoreFactory.php.

References Revision\RevisionStoreFactory\$actorMigration, Revision\RevisionStoreFactory\$blobStoreFactory, Revision\RevisionStoreFactory\$cache, Revision\RevisionStoreFactory\$commentStore, Revision\RevisionStoreFactory\$contentHandlerUseDB, Revision\RevisionStoreFactory\$dbLoadBalancerFactory, Revision\RevisionStoreFactory\$loggerProvider, Revision\RevisionStoreFactory\$nameTables, Revision\RevisionStoreFactory\$slotRoleRegistry, and cache.

Member Function Documentation

◆ getRevisionStore()

Revision\RevisionStoreFactory::getRevisionStore (   $wikiId = false)
Since
1.32
Parameters
bool | string$wikiIdfalse for the current domain / wikid
Returns
RevisionStore for the given wikiId with all necessary services and a logger

Definition at line 123 of file RevisionStoreFactory.php.

References Revision\RevisionStoreFactory\$actorMigration, Revision\RevisionStoreFactory\$cache, Revision\RevisionStoreFactory\$commentStore, Revision\RevisionStoreFactory\$mcrMigrationStage, Revision\RevisionStoreFactory\$slotRoleRegistry, and Revision\RevisionStore\setLogger().

Member Data Documentation

◆ $actorMigration

ActorMigration Revision\RevisionStoreFactory::$actorMigration
private

◆ $blobStoreFactory

BlobStoreFactory Revision\RevisionStoreFactory::$blobStoreFactory
private

Definition at line 52 of file RevisionStoreFactory.php.

Referenced by Revision\RevisionStoreFactory\__construct().

◆ $cache

WANObjectCache Revision\RevisionStoreFactory::$cache
private

◆ $commentStore

CommentStore Revision\RevisionStoreFactory::$commentStore
private

◆ $contentHandlerUseDB

bool Revision\RevisionStoreFactory::$contentHandlerUseDB
private

◆ $dbLoadBalancerFactory

ILBFactory Revision\RevisionStoreFactory::$dbLoadBalancerFactory
private

Definition at line 54 of file RevisionStoreFactory.php.

Referenced by Revision\RevisionStoreFactory\__construct().

◆ $loggerProvider

LoggerSpi Revision\RevisionStoreFactory::$loggerProvider
private

Definition at line 58 of file RevisionStoreFactory.php.

Referenced by Revision\RevisionStoreFactory\__construct().

◆ $mcrMigrationStage

int Revision\RevisionStoreFactory::$mcrMigrationStage
private

One of the MIGRATION_* constants.

Definition at line 65 of file RevisionStoreFactory.php.

Referenced by Revision\RevisionStoreFactory\getRevisionStore().

◆ $nameTables

NameTableStoreFactory Revision\RevisionStoreFactory::$nameTables
private

Definition at line 73 of file RevisionStoreFactory.php.

Referenced by Revision\RevisionStoreFactory\__construct().

◆ $slotRoleRegistry

SlotRoleRegistry Revision\RevisionStoreFactory::$slotRoleRegistry
private

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