MediaWiki REL1_39
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...

Inheritance diagram for MediaWiki\User\TempUser\LocalSerialProvider:
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 ()
 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 25 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 30 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 43 of file LocalSerialProvider.php.


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