public function name($name)
    {
        if (!is_string($name) || empty($name)) {
            throw new TaskBalancerException('Expected task name to be a non-empty string.');
        }
        $this->name = $name;

        return $this;
    }