use WANObjectCache;
use Exception;
use RuntimeException;
-use DBTransactionError;
-use DBReplicationWaitError;
/**
* An interface for generating database load balancers
/** @var BagOStuff */
protected $srvCache;
/** @var BagOStuff */
- protected $memCache;
+ protected $memStash;
/** @var WANObjectCache */
protected $wanCache;
}
$this->srvCache = isset( $conf['srvCache'] ) ? $conf['srvCache'] : new EmptyBagOStuff();
- $this->memCache = isset( $conf['memCache'] ) ? $conf['memCache'] : new EmptyBagOStuff();
+ $this->memStash = isset( $conf['memStash'] ) ? $conf['memStash'] : new EmptyBagOStuff();
$this->wanCache = isset( $conf['wanCache'] )
? $conf['wanCache']
: WANObjectCache::newEmpty();
} );
}
+ public function hasTransactionRound() {
+ return ( $this->trxRoundId !== false );
+ }
+
/**
* Log query info if multi DB transactions are going to be committed now
*/
}
$this->chronProt = new ChronologyProtector(
- $this->memCache,
+ $this->memStash,
[
'ip' => $this->requestInfo['IPAddress'],
'agent' => $this->requestInfo['UserAgent'],
$prefix
);
- $this->forEachLB( function( ILoadBalancer $lb ) use ( $prefix ) {
+ $this->forEachLB( function ( ILoadBalancer $lb ) use ( $prefix ) {
$lb->setDomainPrefix( $prefix );
} );
}
$this->destroy();
}
}
+
+class_alias( LBFactory::class, 'LBFactory' );