[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/db/ -> ChronologyProtector.php (summary)

Generator of database load balancing objects. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

File Size: 109 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

ChronologyProtector:: (3 methods):
  initLB()
  shutdownLB()
  shutdown()


Class: ChronologyProtector  - X-Ref

Class for ensuring a consistent ordering of events as seen by the user, despite replication.
Kind of like Hawking's [[Chronology Protection Agency]].

initLB( LoadBalancer $lb )   X-Ref
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.

param: LoadBalancer $lb
return: void

shutdownLB( LoadBalancer $lb )   X-Ref
Notify the ChronologyProtector that the LoadBalancer is about to shut
down. Saves replication positions.

param: LoadBalancer $lb
return: void

shutdown()   X-Ref
Notify the ChronologyProtector that the LBFactory is done calling shutdownLB() for now.
May commit chronology data to persistent storage.

return: void



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1