|
| __construct (LockManager $lockManager, ILBFactory $LBFactory, LoggerInterface $logger, $repoDB, string $repoSiteId) |
|
| __construct ( $repoDB, string $repoSiteId, ILBFactory $LBFactory, LoggerInterface $logger) |
|
| setBatchSize (int $batchSize) |
| Sets the number of changes we would prefer to process in one go. More...
|
|
| setMessageReporter (MessageReporter $messageReporter) |
|
| setRandomness (int $randomness) |
| Sets the randomness level: selectClient() will randomly pick one of the $randomness most lagged eligible client wikis. More...
|
|
| setDispatchInterval (int $dispatchInterval) |
| Sets the number of seconds we would prefer to let a client "rest" before dispatching to it again. More...
|
|
| setArrayRandOverride (callable $array_rand) |
| Set override for array_rand(), for testing. More...
|
|
| setTimeOverride (callable $time) |
| Set override for time(), for testing. More...
|
|
| setEngageClientLockOverride (callable $engageClientLockOverride) |
| Set override for $db->lock, for testing. More...
|
|
| setIsClientLockUsedOverride (callable $isClientLockUsedOverride) |
| Set override for !$db->lockIsFree, for testing. More...
|
|
| setReleaseClientLockOverride (callable $releaseClientLockOverride) |
| Set override for $db->unlock, for testing. More...
|
|
| setStateTable (string $stateTable) |
|
| setChangesTable (string $changesTable) |
|
| selectClient () |
| Selects a client wiki and locks it. More...
|
|
| initState (array $clientWikiDBs) |
| Initializes the dispatch table by injecting dummy records for all target wikis that are in the configuration but not yet in the dispatch table. More...
|
|
| lockClient (string $siteID) |
| Attempt to lock the given target wiki. More...
|
|
| releaseClient (array $state) |
| Updates the given client wiki's entry in the dispatch table and releases the global lock on that wiki. More...
|
|
SQL-based implementation of ChangeDispatchCoordinator when there is a LockManager implementation provided to be used instead of SqlChangeDisptachCoordinator's own locking.
- Copyright
- GPL-2.0-or-later
- Author
- Amir Sarabadani ladsg.nosp@m.roup.nosp@m.@gmai.nosp@m.l.co.nosp@m.m