MediaWiki master
MediaWiki\User\TempUser\LocalSerialProvider Class Reference

A serial provider which allocates IDs from the local database, or from a shared database if $wgSharedDB is used. More...

Inherits MediaWiki\User\TempUser\DBSerialProvider.

Collaboration diagram for MediaWiki\User\TempUser\LocalSerialProvider:

Public Member Functions

 __construct ( $config, ILoadBalancer $lb)
 
- Public Member Functions inherited from MediaWiki\User\TempUser\DBSerialProvider
 __construct ( $config)
 
 acquireIndex (int $year=0)
 Acquire an integer such that it is unlikely to be used again, and return it.
 

Protected Member Functions

 getDB ()
 
 getTableName ()
 

Detailed Description

A serial provider which allocates IDs from the local database, or from a shared database if $wgSharedDB is used.

It is "local" in the sense that it uses the same DB connection as the local wiki.

Since
1.39

Definition at line 14 of file LocalSerialProvider.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\User\TempUser\LocalSerialProvider::__construct ( $config,
ILoadBalancer $lb )
Parameters
array$config
  • numShards (int, default 1): A small integer. This can be set to a value greater than 1 to avoid acquiring a global lock when allocating IDs, at the expense of making the IDs be non-monotonic.
ILoadBalancer$lb

Definition at line 24 of file LocalSerialProvider.php.

Member Function Documentation

◆ getDB()

MediaWiki\User\TempUser\LocalSerialProvider::getDB ( )
protected
Returns
IDatabase

Reimplemented from MediaWiki\User\TempUser\DBSerialProvider.

Definition at line 29 of file LocalSerialProvider.php.

References DB_PRIMARY.

◆ getTableName()

MediaWiki\User\TempUser\LocalSerialProvider::getTableName ( )
protected
Returns
string

Reimplemented from MediaWiki\User\TempUser\DBSerialProvider.

Definition at line 42 of file LocalSerialProvider.php.


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