X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Flibs%2FHashRing.php;h=66121303bcd297c3616e675863e53a995bc67003;hp=f61c139a99e6399b702c315c274f510c8d68cbcf;hb=45a6a7ad6771ed4c94f7a9c568ffeeca4935ca87;hpb=52ce204415df71eb978b1f6f61a6122f7c3b09f6 diff --git a/includes/libs/HashRing.php b/includes/libs/HashRing.php index f61c139a99..66121303bc 100644 --- a/includes/libs/HashRing.php +++ b/includes/libs/HashRing.php @@ -26,14 +26,14 @@ * @since 1.22 */ class HashRing { - /** @var Array (location => weight) */ + /** @var array (location => weight) */ protected $sourceMap = []; - /** @var Array (location => (start, end)) */ + /** @var array (location => (start, end)) */ protected $ring = []; /** @var HashRing|null */ protected $liveRing; - /** @var Array (location => UNIX timestamp) */ + /** @var array (location => UNIX timestamp) */ protected $ejectionExpiries = []; /** @var int UNIX timestamp */ protected $ejectionNextExpiry = INF; @@ -83,7 +83,7 @@ class HashRing { * @param string $item * @return string Location */ - public function getLocation( $item ) { + final public function getLocation( $item ) { $locations = $this->getLocations( $item, 1 ); return $locations[0]; @@ -174,7 +174,7 @@ class HashRing { * @return HashRing * @throws UnexpectedValueException */ - public function getLiveRing() { + protected function getLiveRing() { $now = time(); if ( $this->liveRing === null || $this->ejectionNextExpiry <= $now ) { $this->ejectionExpiries = array_filter(