public function assignShardId(string $string, bool $is_sha1 = false)
    {
        if ($this->total_mysql_db_shards < 1) {
            throw $this->c::issue('No MySQL DB shards available.');
        }
        return $this->shardId($string, $is_sha1, $this->total_mysql_db_shards);
    }
public function assignShardId(string $string, bool $is_sha1 = false)
    {
        if ($this->total_mysql_db_shards < 1) {
            throw $this->c::issue('No MySQL DB shards available.');
        }
        return $this->shardId($string, $is_sha1, $this->total_mysql_db_shards);
    }
public function assignShardId ( string $ string , bool $ is_sha1 = false ) { if ( $ this -> total_mysql_db_shards < 1 ) { throw $ this -> c :: issue ( 'No MySQL DB shards available.' ) ; } return $ this -> shardId ( $ string , $ is_sha1 , $ this -> total_mysql_db_shards ) ; }
Assign shard ID.

@since 150424 SHA-1 modulus.

@param string $string  String or a SHA-1 hash.
@param bool   $is_sha1 String is already a SHA-1 hash?

@return int Assigned shard ID; based on `sha1($string)`.

@internal This one is based on the actual number of configured shards;
i.e., not on the upper limit of the shard ID itself. `65536` is not used here.
Assign shard ID .