malkusch\lock\mutex\RedisMutex::add PHP Method

add() abstract protected method

Sets the key only if such key doesn't exist at the server yet.
abstract protected add ( mixed $redisAPI, string $key, string $value, integer $expire ) : boolean
$redisAPI mixed The connected Redis API.
$key string The key.
$value string The value.
$expire integer The TTL seconds.
return boolean True, if the key was set.
    protected abstract function add($redisAPI, $key, $value, $expire);