public function setGearmanPort(int $port) : void
    {
        if ($port < 1 || $port > 65535) {
            throw new ManagerException('Invalid port number.');
        }
        $this->gearmanPort = $port;
    }