getTracer(Cluster::class, (string) \phpversion('relay')); } /** * Block pipeline calls. * * @return \RedisCachePro\Clients\Transaction */ public function pipeline() { throw new LogicException('Relay\Cluster does not support pipelines'); } /** * Always return `0` for cluster connections. * * @return int */ public function idleTime() { return 0; } /** * Pass `scan()` calls to the client with iterator reference. * * @param ?int $iterator * @param string|array $key * @param ?string $match * @param int $count * @return mixed */ public function scan(&$iterator, $key, $match = null, $count = 0) { return $this->{$this->callback}(function () use (&$iterator, $key, $match, $count) { return $this->client->scan($iterator, $key, $match, $count); }, 'scan'); } /** * Pass `hscan()` calls to the client with iterator reference. * * @param string $key * @param ?int $iterator * @param ?string $match * @param int $count * @return mixed */ public function hscan($key, &$iterator, $match = null, $count = 0) { return $this->{$this->callback}(function () use ($key, &$iterator, $match, $count) { return $this->client->hscan($key, $iterator, $match, $count); }, 'hscan'); } /** * Pass `sscan()` calls to the client with iterator reference. * * @param string $key * @param ?int $iterator * @param ?string $match * @param int $count * @return mixed */ public function sscan($key, &$iterator, $match = null, $count = 0) { return $this->{$this->callback}(function () use ($key, &$iterator, $match, $count) { return $this->client->sscan($key, $iterator, $match, $count); }, 'sscan'); } /** * Pass `zscan()` calls to the client with iterator reference. * * @param string $key * @param ?int $iterator * @param ?string $match * @param int $count * @return mixed */ public function zscan($key, &$iterator, $match = null, $count = 0) { return $this->{$this->callback}(function () use ($key, &$iterator, $match, $count) { return $this->client->zscan($key, $iterator, $match, $count); }, 'zscan'); } }