MediaWiki master
LocalSerialProvider.php
Go to the documentation of this file.
1<?php
2
4
6
15 private ILBFactory $lbf;
16
24 public function __construct( $config, ILBFactory $lbf ) {
25 parent::__construct( $config );
26 $this->lbf = $lbf;
27 }
28
29 protected function getDB() {
30 // So that startAtomic() will start a commit, reducing lock time.
31 // Without this flag, the transaction will be open until the start
32 // of request shutdown. This could be omitted to reduce the
33 // connection overhead, with numShards tuned upwards to compensate.
34 return $this->lbf->getAutoCommitPrimaryConnection();
35 }
36
37 protected function getTableName() {
38 return 'user_autocreate_serial';
39 }
40}
Base class for serial acquisition code shared between core and CentralAuth.
A serial provider which allocates IDs from the local database, or from a shared database if $wgShared...
Manager of ILoadBalancer objects and, indirectly, IDatabase connections.