* getLiveRing() is now protected
* getLocation() is now final
Change-Id: I16002fe7187d8bbb6e36d4dd9a1302ee1d46a4bb
// phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
for ( $i = $this->maxPartitionsTry; $i > 0 && count( $jobsLeft ); --$i ) {
try {
- $partitionRing->getLiveRing();
+ $partitionRing->getLiveLocationWeights();
} catch ( UnexpectedValueException $e ) {
break; // all servers down; nothing to insert to
}
* @param string $item
* @return string Location
*/
- public function getLocation( $item ) {
+ final public function getLocation( $item ) {
$locations = $this->getLocations( $item, 1 );
return $locations[0];
* @return HashRing
* @throws UnexpectedValueException
*/
- public function getLiveRing() {
+ protected function getLiveRing() {
$now = time();
if ( $this->liveRing === null || $this->ejectionNextExpiry <= $now ) {
$this->ejectionExpiries = array_filter(