private $mainLB;
/** @var LoadBalancer[] */
private $extLBs = array();
- /** @var ChronologyProtector */
- private $chronProt;
/** @var string */
private $loadMonitorClass;
public function __construct( array $conf ) {
parent::__construct( $conf );
- $this->chronProt = new ChronologyProtector;
$this->loadMonitorClass = isset( $conf['loadMonitorClass'] )
? $conf['loadMonitorClass']
: null;
}
}
- public function shutdown() {
- if ( $this->mainLB ) {
- $this->chronProt->shutdownLB( $this->mainLB );
+ public function shutdown( $flags = 0 ) {
+ if ( !( $flags & self::SHUTDOWN_NO_CHRONPROT ) ) {
+ $this->shutdownChronologyProtector( $this->chronProt );
}
- foreach ( $this->extLBs as $extLB ) {
- $this->chronProt->shutdownLB( $extLB );
- }
- $this->chronProt->shutdown();
- $this->commitMasterChanges();
+ $this->commitMasterChanges(); // sanity
}
}