MediaWiki
1.23.2
|
Class for ensuring a consistent ordering of events as seen by the user, despite replication. More...
Public Member Functions | |
initLB (LoadBalancer $lb) | |
Initialise a LoadBalancer to give it appropriate chronology protection. More... | |
shutdown () | |
Notify the ChronologyProtector that the LBFactory is done calling shutdownLB() for now. More... | |
shutdownLB (LoadBalancer $lb) | |
Notify the ChronologyProtector that the LoadBalancer is about to shut down. More... | |
Protected Attributes | |
bool | $initialized = false |
Whether the session data was loaded *. More... | |
array | $shutdownPositions = array() |
(DB master name => position) * More... | |
array | $startupPositions = array() |
(DB master name => position) * More... | |
Class for ensuring a consistent ordering of events as seen by the user, despite replication.
Kind of like Hawking's [[Chronology Protection Agency]].
Definition at line 28 of file ChronologyProtector.php.
ChronologyProtector::initLB | ( | LoadBalancer | $lb | ) |
Initialise a LoadBalancer to give it appropriate chronology protection.
If the session has a previous master position recorded, this will try to make sure that the next query to a slave of that master will see changes up to that position by delaying execution. The delay may timeout and allow stale data if no non-lagged slaves are available.
LoadBalancer | $lb |
Definition at line 46 of file ChronologyProtector.php.
ChronologyProtector::shutdown | ( | ) |
Notify the ChronologyProtector that the LBFactory is done calling shutdownLB() for now.
May commit chronology data to persistent storage.
Definition at line 99 of file ChronologyProtector.php.
References $shutdownPositions, and wfDebug().
ChronologyProtector::shutdownLB | ( | LoadBalancer | $lb | ) |
Notify the ChronologyProtector that the LoadBalancer is about to shut down.
Saves replication positions.
LoadBalancer | $lb |
Definition at line 72 of file ChronologyProtector.php.
|
protected |
Whether the session data was loaded *.
Definition at line 33 of file ChronologyProtector.php.
(DB master name => position) *
Definition at line 31 of file ChronologyProtector.php.
Referenced by shutdown().
(DB master name => position) *
Definition at line 29 of file ChronologyProtector.php.