NinjaMutex\Lock\PhpRedisLock::getLock PHP Method

getLock() protected method

protected getLock ( string $name, boolean $blocking ) : boolean
$name string
$blocking boolean
return boolean
    protected function getLock($name, $blocking)
    {
        if (!$this->client->setnx($name, serialize($this->getLockInformation()))) {
            return false;
        }
        return true;
    }