protected function add($redis, $key, $value, $expire)
{
try {
return $redis->set($key, $value, ["nx", "ex" => $expire]);
} catch (RedisException $e) {
$message = sprintf("Failed to acquire lock for key '%s' at %s", $key, $this->getRedisIdentifier($redis));
throw new LockAcquireException($message, 0, $e);
}
}