RelayClusterProxy.php 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Cache\Traits;
  11. use Relay\Cluster;
  12. use Relay\Relay;
  13. use Symfony\Component\Cache\Traits\Relay\RelayCluster11Trait;
  14. use Symfony\Component\Cache\Traits\Relay\RelayCluster121Trait;
  15. use Symfony\Component\Cache\Traits\Relay\RelayCluster12Trait;
  16. use Symfony\Component\Cache\Traits\Relay\RelayCluster20Trait;
  17. use Symfony\Component\VarExporter\LazyObjectInterface;
  18. use Symfony\Contracts\Service\ResetInterface;
  19. // Help opcache.preload discover always-needed symbols
  20. class_exists(\Symfony\Component\VarExporter\Internal\Hydrator::class);
  21. class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectRegistry::class);
  22. class_exists(\Symfony\Component\VarExporter\Internal\LazyObjectState::class);
  23. /**
  24. * @internal
  25. */
  26. class RelayClusterProxy extends Cluster implements ResetInterface, LazyObjectInterface
  27. {
  28. use RedisProxyTrait {
  29. resetLazyObject as reset;
  30. }
  31. use RelayCluster11Trait;
  32. use RelayCluster121Trait;
  33. use RelayCluster12Trait;
  34. use RelayCluster20Trait;
  35. public function __construct(
  36. ?string $name,
  37. ?array $seeds = null,
  38. int|float $connect_timeout = 0,
  39. int|float $command_timeout = 0,
  40. bool $persistent = false,
  41. #[\SensitiveParameter] mixed $auth = null,
  42. ?array $context = null,
  43. ) {
  44. $this->initializeLazyObject()->__construct(...\func_get_args());
  45. }
  46. public function close(): bool
  47. {
  48. return $this->initializeLazyObject()->close(...\func_get_args());
  49. }
  50. public function listen(?callable $callback): bool
  51. {
  52. return $this->initializeLazyObject()->listen(...\func_get_args());
  53. }
  54. public function onFlushed(?callable $callback): bool
  55. {
  56. return $this->initializeLazyObject()->onFlushed(...\func_get_args());
  57. }
  58. public function onInvalidated(?callable $callback, ?string $pattern = null): bool
  59. {
  60. return $this->initializeLazyObject()->onInvalidated(...\func_get_args());
  61. }
  62. public function dispatchEvents(): false|int
  63. {
  64. return $this->initializeLazyObject()->dispatchEvents(...\func_get_args());
  65. }
  66. public function dump(mixed $key): Cluster|string|false
  67. {
  68. return $this->initializeLazyObject()->dump(...\func_get_args());
  69. }
  70. public function getOption(int $option): mixed
  71. {
  72. return $this->initializeLazyObject()->getOption(...\func_get_args());
  73. }
  74. public function setOption(int $option, mixed $value): bool
  75. {
  76. return $this->initializeLazyObject()->setOption(...\func_get_args());
  77. }
  78. public function getTransferredBytes(): array|false
  79. {
  80. return $this->initializeLazyObject()->getTransferredBytes(...\func_get_args());
  81. }
  82. public function getrange(mixed $key, int $start, int $end): Cluster|string|false
  83. {
  84. return $this->initializeLazyObject()->getrange(...\func_get_args());
  85. }
  86. public function addIgnorePatterns(string ...$pattern): int
  87. {
  88. return $this->initializeLazyObject()->addIgnorePatterns(...\func_get_args());
  89. }
  90. public function addAllowPatterns(string ...$pattern): int
  91. {
  92. return $this->initializeLazyObject()->addAllowPatterns(...\func_get_args());
  93. }
  94. public function _serialize(mixed $value): string
  95. {
  96. return $this->initializeLazyObject()->_serialize(...\func_get_args());
  97. }
  98. public function _unserialize(string $value): mixed
  99. {
  100. return $this->initializeLazyObject()->_unserialize(...\func_get_args());
  101. }
  102. public function _compress(string $value): string
  103. {
  104. return $this->initializeLazyObject()->_compress(...\func_get_args());
  105. }
  106. public function _uncompress(string $value): string
  107. {
  108. return $this->initializeLazyObject()->_uncompress(...\func_get_args());
  109. }
  110. public function _pack(mixed $value): string
  111. {
  112. return $this->initializeLazyObject()->_pack(...\func_get_args());
  113. }
  114. public function _unpack(string $value): mixed
  115. {
  116. return $this->initializeLazyObject()->_unpack(...\func_get_args());
  117. }
  118. public function _prefix(mixed $value): string
  119. {
  120. return $this->initializeLazyObject()->_prefix(...\func_get_args());
  121. }
  122. public function getLastError(): ?string
  123. {
  124. return $this->initializeLazyObject()->getLastError(...\func_get_args());
  125. }
  126. public function clearLastError(): bool
  127. {
  128. return $this->initializeLazyObject()->clearLastError(...\func_get_args());
  129. }
  130. public function clearTransferredBytes(): bool
  131. {
  132. return $this->initializeLazyObject()->clearTransferredBytes(...\func_get_args());
  133. }
  134. public function endpointId(): array|false
  135. {
  136. return $this->initializeLazyObject()->endpointId(...\func_get_args());
  137. }
  138. public function rawCommand(array|string $key_or_address, string $cmd, mixed ...$args): mixed
  139. {
  140. return $this->initializeLazyObject()->rawCommand(...\func_get_args());
  141. }
  142. public function cluster(array|string $key_or_address, string $operation, mixed ...$args): mixed
  143. {
  144. return $this->initializeLazyObject()->cluster(...\func_get_args());
  145. }
  146. public function info(array|string $key_or_address, string ...$sections): Cluster|array|false
  147. {
  148. return $this->initializeLazyObject()->info(...\func_get_args());
  149. }
  150. public function flushdb(array|string $key_or_address, ?bool $sync = null): Cluster|bool
  151. {
  152. return $this->initializeLazyObject()->flushdb(...\func_get_args());
  153. }
  154. public function flushall(array|string $key_or_address, ?bool $sync = null): Cluster|bool
  155. {
  156. return $this->initializeLazyObject()->flushall(...\func_get_args());
  157. }
  158. public function dbsize(array|string $key_or_address): Cluster|int|false
  159. {
  160. return $this->initializeLazyObject()->dbsize(...\func_get_args());
  161. }
  162. public function restore(mixed $key, int $ttl, string $value, ?array $options = null): Cluster|bool
  163. {
  164. return $this->initializeLazyObject()->restore(...\func_get_args());
  165. }
  166. public function echo(array|string $key_or_address, string $message): Cluster|string|false
  167. {
  168. return $this->initializeLazyObject()->echo(...\func_get_args());
  169. }
  170. public function ping(array|string $key_or_address, ?string $message = null): Cluster|bool|string
  171. {
  172. return $this->initializeLazyObject()->ping(...\func_get_args());
  173. }
  174. public function idleTime(): int
  175. {
  176. return $this->initializeLazyObject()->idleTime(...\func_get_args());
  177. }
  178. public function randomkey(array|string $key_or_address): Cluster|bool|string
  179. {
  180. return $this->initializeLazyObject()->randomkey(...\func_get_args());
  181. }
  182. public function time(array|string $key_or_address): Cluster|array|false
  183. {
  184. return $this->initializeLazyObject()->time(...\func_get_args());
  185. }
  186. public function bgrewriteaof(array|string $key_or_address): Cluster|bool
  187. {
  188. return $this->initializeLazyObject()->bgrewriteaof(...\func_get_args());
  189. }
  190. public function lastsave(array|string $key_or_address): Cluster|false|int
  191. {
  192. return $this->initializeLazyObject()->lastsave(...\func_get_args());
  193. }
  194. public function lcs(mixed $key1, mixed $key2, ?array $options = null): mixed
  195. {
  196. return $this->initializeLazyObject()->lcs(...\func_get_args());
  197. }
  198. public function bgsave(array|string $key_or_address, bool $schedule = false): Cluster|bool
  199. {
  200. return $this->initializeLazyObject()->bgsave(...\func_get_args());
  201. }
  202. public function save(array|string $key_or_address): Cluster|bool
  203. {
  204. return $this->initializeLazyObject()->save(...\func_get_args());
  205. }
  206. public function role(array|string $key_or_address): Cluster|array|false
  207. {
  208. return $this->initializeLazyObject()->role(...\func_get_args());
  209. }
  210. public function ttl(mixed $key): Cluster|false|int
  211. {
  212. return $this->initializeLazyObject()->ttl(...\func_get_args());
  213. }
  214. public function pttl(mixed $key): Cluster|false|int
  215. {
  216. return $this->initializeLazyObject()->pttl(...\func_get_args());
  217. }
  218. public function exists(mixed ...$keys): Cluster|bool|int
  219. {
  220. return $this->initializeLazyObject()->exists(...\func_get_args());
  221. }
  222. public function eval(mixed $script, array $args = [], int $num_keys = 0): mixed
  223. {
  224. return $this->initializeLazyObject()->eval(...\func_get_args());
  225. }
  226. public function eval_ro(mixed $script, array $args = [], int $num_keys = 0): mixed
  227. {
  228. return $this->initializeLazyObject()->eval_ro(...\func_get_args());
  229. }
  230. public function evalsha(string $sha, array $args = [], int $num_keys = 0): mixed
  231. {
  232. return $this->initializeLazyObject()->evalsha(...\func_get_args());
  233. }
  234. public function evalsha_ro(string $sha, array $args = [], int $num_keys = 0): mixed
  235. {
  236. return $this->initializeLazyObject()->evalsha_ro(...\func_get_args());
  237. }
  238. public function client(array|string $key_or_address, string $operation, mixed ...$args): mixed
  239. {
  240. return $this->initializeLazyObject()->client(...\func_get_args());
  241. }
  242. public function geoadd(mixed $key, float $lng, float $lat, string $member, mixed ...$other_triples_and_options): Cluster|false|int
  243. {
  244. return $this->initializeLazyObject()->geoadd(...\func_get_args());
  245. }
  246. public function geodist(mixed $key, string $src, string $dst, ?string $unit = null): Cluster|float|false
  247. {
  248. return $this->initializeLazyObject()->geodist(...\func_get_args());
  249. }
  250. public function geohash(mixed $key, string $member, string ...$other_members): Cluster|array|false
  251. {
  252. return $this->initializeLazyObject()->geohash(...\func_get_args());
  253. }
  254. public function georadius(mixed $key, float $lng, float $lat, float $radius, string $unit, array $options = []): mixed
  255. {
  256. return $this->initializeLazyObject()->georadius(...\func_get_args());
  257. }
  258. public function georadiusbymember(mixed $key, string $member, float $radius, string $unit, array $options = []): mixed
  259. {
  260. return $this->initializeLazyObject()->georadiusbymember(...\func_get_args());
  261. }
  262. public function georadiusbymember_ro(mixed $key, string $member, float $radius, string $unit, array $options = []): mixed
  263. {
  264. return $this->initializeLazyObject()->georadiusbymember_ro(...\func_get_args());
  265. }
  266. public function georadius_ro(mixed $key, float $lng, float $lat, float $radius, string $unit, array $options = []): mixed
  267. {
  268. return $this->initializeLazyObject()->georadius_ro(...\func_get_args());
  269. }
  270. public function geosearchstore(mixed $dstkey, mixed $srckey, array|string $position, array|int|float $shape, string $unit, array $options = []): Cluster|false|int
  271. {
  272. return $this->initializeLazyObject()->geosearchstore(...\func_get_args());
  273. }
  274. public function geosearch(mixed $key, array|string $position, array|int|float $shape, string $unit, array $options = []): Cluster|array|false
  275. {
  276. return $this->initializeLazyObject()->geosearch(...\func_get_args());
  277. }
  278. public function get(mixed $key): mixed
  279. {
  280. return $this->initializeLazyObject()->get(...\func_get_args());
  281. }
  282. public function getset(mixed $key, mixed $value): mixed
  283. {
  284. return $this->initializeLazyObject()->getset(...\func_get_args());
  285. }
  286. public function setrange(mixed $key, int $start, mixed $value): Cluster|false|int
  287. {
  288. return $this->initializeLazyObject()->setrange(...\func_get_args());
  289. }
  290. public function getbit(mixed $key, int $pos): Cluster|false|int
  291. {
  292. return $this->initializeLazyObject()->getbit(...\func_get_args());
  293. }
  294. public function bitcount(mixed $key, int $start = 0, int $end = -1, bool $by_bit = false): Cluster|false|int
  295. {
  296. return $this->initializeLazyObject()->bitcount(...\func_get_args());
  297. }
  298. public function config(array|string $key_or_address, string $operation, mixed ...$args): mixed
  299. {
  300. return $this->initializeLazyObject()->config(...\func_get_args());
  301. }
  302. public function command(mixed ...$args): Cluster|array|false|int
  303. {
  304. return $this->initializeLazyObject()->command(...\func_get_args());
  305. }
  306. public function bitop(string $operation, string $dstkey, string $srckey, string ...$other_keys): Cluster|false|int
  307. {
  308. return $this->initializeLazyObject()->bitop(...\func_get_args());
  309. }
  310. public function bitpos(mixed $key, int $bit, ?int $start = null, ?int $end = null, bool $by_bit = false): Cluster|false|int
  311. {
  312. return $this->initializeLazyObject()->bitpos(...\func_get_args());
  313. }
  314. public function blmove(mixed $srckey, mixed $dstkey, string $srcpos, string $dstpos, float $timeout): Cluster|string|false|null
  315. {
  316. return $this->initializeLazyObject()->blmove(...\func_get_args());
  317. }
  318. public function lmove(mixed $srckey, mixed $dstkey, string $srcpos, string $dstpos): Cluster|string|false|null
  319. {
  320. return $this->initializeLazyObject()->lmove(...\func_get_args());
  321. }
  322. public function setbit(mixed $key, int $pos, int $value): Cluster|false|int
  323. {
  324. return $this->initializeLazyObject()->setbit(...\func_get_args());
  325. }
  326. public function acl(array|string $key_or_address, string $operation, string ...$args): mixed
  327. {
  328. return $this->initializeLazyObject()->acl(...\func_get_args());
  329. }
  330. public function append(mixed $key, mixed $value): Cluster|false|int
  331. {
  332. return $this->initializeLazyObject()->append(...\func_get_args());
  333. }
  334. public function set(mixed $key, mixed $value, mixed $options = null): Cluster|string|bool
  335. {
  336. return $this->initializeLazyObject()->set(...\func_get_args());
  337. }
  338. public function getex(mixed $key, ?array $options = null): mixed
  339. {
  340. return $this->initializeLazyObject()->getex(...\func_get_args());
  341. }
  342. public function setex(mixed $key, int $seconds, mixed $value): Cluster|bool
  343. {
  344. return $this->initializeLazyObject()->setex(...\func_get_args());
  345. }
  346. public function pfadd(mixed $key, array $elements): Cluster|false|int
  347. {
  348. return $this->initializeLazyObject()->pfadd(...\func_get_args());
  349. }
  350. public function pfcount(mixed $key): Cluster|int|false
  351. {
  352. return $this->initializeLazyObject()->pfcount(...\func_get_args());
  353. }
  354. public function pfmerge(string $dstkey, array $srckeys): Cluster|bool
  355. {
  356. return $this->initializeLazyObject()->pfmerge(...\func_get_args());
  357. }
  358. public function psetex(mixed $key, int $milliseconds, mixed $value): Cluster|bool
  359. {
  360. return $this->initializeLazyObject()->psetex(...\func_get_args());
  361. }
  362. public function publish(string $channel, string $message): Cluster|false|int
  363. {
  364. return $this->initializeLazyObject()->publish(...\func_get_args());
  365. }
  366. public function pubsub(array|string $key_or_address, string $operation, mixed ...$args): mixed
  367. {
  368. return $this->initializeLazyObject()->pubsub(...\func_get_args());
  369. }
  370. public function setnx(mixed $key, mixed $value): Cluster|bool
  371. {
  372. return $this->initializeLazyObject()->setnx(...\func_get_args());
  373. }
  374. public function mget(array $keys): Cluster|array|false
  375. {
  376. return $this->initializeLazyObject()->mget(...\func_get_args());
  377. }
  378. public function mset(array $kvals): Cluster|array|bool
  379. {
  380. return $this->initializeLazyObject()->mset(...\func_get_args());
  381. }
  382. public function msetnx(array $kvals): Cluster|array|bool
  383. {
  384. return $this->initializeLazyObject()->msetnx(...\func_get_args());
  385. }
  386. public function rename(mixed $key, mixed $newkey): Cluster|bool
  387. {
  388. return $this->initializeLazyObject()->rename(...\func_get_args());
  389. }
  390. public function renamenx(mixed $key, mixed $newkey): Cluster|bool
  391. {
  392. return $this->initializeLazyObject()->renamenx(...\func_get_args());
  393. }
  394. public function del(mixed ...$keys): Cluster|bool|int
  395. {
  396. return $this->initializeLazyObject()->del(...\func_get_args());
  397. }
  398. public function unlink(mixed ...$keys): Cluster|false|int
  399. {
  400. return $this->initializeLazyObject()->unlink(...\func_get_args());
  401. }
  402. public function expire(mixed $key, int $seconds, ?string $mode = null): Cluster|bool
  403. {
  404. return $this->initializeLazyObject()->expire(...\func_get_args());
  405. }
  406. public function pexpire(mixed $key, int $milliseconds): Cluster|bool
  407. {
  408. return $this->initializeLazyObject()->pexpire(...\func_get_args());
  409. }
  410. public function expireat(mixed $key, int $timestamp): Cluster|bool
  411. {
  412. return $this->initializeLazyObject()->expireat(...\func_get_args());
  413. }
  414. public function expiretime(mixed $key): Cluster|false|int
  415. {
  416. return $this->initializeLazyObject()->expiretime(...\func_get_args());
  417. }
  418. public function getWithMeta($key): Cluster|array|false
  419. {
  420. return $this->initializeLazyObject()->getWithMeta(...\func_get_args());
  421. }
  422. public function pexpireat(mixed $key, int $timestamp_ms): Cluster|bool
  423. {
  424. return $this->initializeLazyObject()->pexpireat(...\func_get_args());
  425. }
  426. public function pexpiretime(mixed $key): Cluster|false|int
  427. {
  428. return $this->initializeLazyObject()->pexpiretime(...\func_get_args());
  429. }
  430. public function persist(mixed $key): Cluster|bool
  431. {
  432. return $this->initializeLazyObject()->persist(...\func_get_args());
  433. }
  434. public function type(mixed $key): Cluster|bool|int|string
  435. {
  436. return $this->initializeLazyObject()->type(...\func_get_args());
  437. }
  438. public function lrange(mixed $key, int $start, int $stop): Cluster|array|false
  439. {
  440. return $this->initializeLazyObject()->lrange(...\func_get_args());
  441. }
  442. public function lpush(mixed $key, mixed $member, mixed ...$members): Cluster|false|int
  443. {
  444. return $this->initializeLazyObject()->lpush(...\func_get_args());
  445. }
  446. public function rpush(mixed $key, mixed $member, mixed ...$members): Cluster|false|int
  447. {
  448. return $this->initializeLazyObject()->rpush(...\func_get_args());
  449. }
  450. public function lpushx(mixed $key, mixed $member, mixed ...$members): Cluster|false|int
  451. {
  452. return $this->initializeLazyObject()->lpushx(...\func_get_args());
  453. }
  454. public function rpushx(mixed $key, mixed $member, mixed ...$members): Cluster|false|int
  455. {
  456. return $this->initializeLazyObject()->rpushx(...\func_get_args());
  457. }
  458. public function lset(mixed $key, int $index, mixed $member): Cluster|bool
  459. {
  460. return $this->initializeLazyObject()->lset(...\func_get_args());
  461. }
  462. public function lpop(mixed $key, int $count = 1): mixed
  463. {
  464. return $this->initializeLazyObject()->lpop(...\func_get_args());
  465. }
  466. public function lpos(mixed $key, mixed $value, ?array $options = null): mixed
  467. {
  468. return $this->initializeLazyObject()->lpos(...\func_get_args());
  469. }
  470. public function rpop(mixed $key, int $count = 1): mixed
  471. {
  472. return $this->initializeLazyObject()->rpop(...\func_get_args());
  473. }
  474. public function rpoplpush(mixed $srckey, mixed $dstkey): mixed
  475. {
  476. return $this->initializeLazyObject()->rpoplpush(...\func_get_args());
  477. }
  478. public function brpoplpush(mixed $srckey, mixed $dstkey, float $timeout): mixed
  479. {
  480. return $this->initializeLazyObject()->brpoplpush(...\func_get_args());
  481. }
  482. public function blpop(string|array $key, string|float $timeout_or_key, mixed ...$extra_args): Cluster|array|false|null
  483. {
  484. return $this->initializeLazyObject()->blpop(...\func_get_args());
  485. }
  486. public function blmpop(float $timeout, array $keys, string $from, int $count = 1): mixed
  487. {
  488. return $this->initializeLazyObject()->blmpop(...\func_get_args());
  489. }
  490. public function bzmpop(float $timeout, array $keys, string $from, int $count = 1): Cluster|array|false|null
  491. {
  492. return $this->initializeLazyObject()->bzmpop(...\func_get_args());
  493. }
  494. public function lmpop(array $keys, string $from, int $count = 1): mixed
  495. {
  496. return $this->initializeLazyObject()->lmpop(...\func_get_args());
  497. }
  498. public function zmpop(array $keys, string $from, int $count = 1): Cluster|array|false|null
  499. {
  500. return $this->initializeLazyObject()->zmpop(...\func_get_args());
  501. }
  502. public function brpop(string|array $key, string|float $timeout_or_key, mixed ...$extra_args): Cluster|array|false|null
  503. {
  504. return $this->initializeLazyObject()->brpop(...\func_get_args());
  505. }
  506. public function bzpopmax(string|array $key, string|float $timeout_or_key, mixed ...$extra_args): Cluster|array|false|null
  507. {
  508. return $this->initializeLazyObject()->bzpopmax(...\func_get_args());
  509. }
  510. public function bzpopmin(string|array $key, string|float $timeout_or_key, mixed ...$extra_args): Cluster|array|false|null
  511. {
  512. return $this->initializeLazyObject()->bzpopmin(...\func_get_args());
  513. }
  514. public function object(string $op, mixed $key): mixed
  515. {
  516. return $this->initializeLazyObject()->object(...\func_get_args());
  517. }
  518. public function geopos(mixed $key, mixed ...$members): Cluster|array|false
  519. {
  520. return $this->initializeLazyObject()->geopos(...\func_get_args());
  521. }
  522. public function lrem(mixed $key, mixed $member, int $count = 0): Cluster|false|int
  523. {
  524. return $this->initializeLazyObject()->lrem(...\func_get_args());
  525. }
  526. public function lindex(mixed $key, int $index): mixed
  527. {
  528. return $this->initializeLazyObject()->lindex(...\func_get_args());
  529. }
  530. public function linsert(mixed $key, string $op, mixed $pivot, mixed $element): Cluster|false|int
  531. {
  532. return $this->initializeLazyObject()->linsert(...\func_get_args());
  533. }
  534. public function ltrim(mixed $key, int $start, int $end): Cluster|bool
  535. {
  536. return $this->initializeLazyObject()->ltrim(...\func_get_args());
  537. }
  538. public function hget(mixed $key, mixed $member): mixed
  539. {
  540. return $this->initializeLazyObject()->hget(...\func_get_args());
  541. }
  542. public function hstrlen(mixed $key, mixed $member): Cluster|false|int
  543. {
  544. return $this->initializeLazyObject()->hstrlen(...\func_get_args());
  545. }
  546. public function hgetall(mixed $key): Cluster|array|false
  547. {
  548. return $this->initializeLazyObject()->hgetall(...\func_get_args());
  549. }
  550. public function hkeys(mixed $key): Cluster|array|false
  551. {
  552. return $this->initializeLazyObject()->hkeys(...\func_get_args());
  553. }
  554. public function hvals(mixed $key): Cluster|array|false
  555. {
  556. return $this->initializeLazyObject()->hvals(...\func_get_args());
  557. }
  558. public function hmget(mixed $key, array $members): Cluster|array|false
  559. {
  560. return $this->initializeLazyObject()->hmget(...\func_get_args());
  561. }
  562. public function hmset(mixed $key, array $members): Cluster|bool
  563. {
  564. return $this->initializeLazyObject()->hmset(...\func_get_args());
  565. }
  566. public function hexists(mixed $key, mixed $member): Cluster|bool
  567. {
  568. return $this->initializeLazyObject()->hexists(...\func_get_args());
  569. }
  570. public function hrandfield(mixed $key, ?array $options = null): Cluster|array|string|false
  571. {
  572. return $this->initializeLazyObject()->hrandfield(...\func_get_args());
  573. }
  574. public function hsetnx(mixed $key, mixed $member, mixed $value): Cluster|bool
  575. {
  576. return $this->initializeLazyObject()->hsetnx(...\func_get_args());
  577. }
  578. public function hset(mixed $key, mixed ...$keys_and_vals): Cluster|int|false
  579. {
  580. return $this->initializeLazyObject()->hset(...\func_get_args());
  581. }
  582. public function hdel(mixed $key, mixed $member, mixed ...$members): Cluster|false|int
  583. {
  584. return $this->initializeLazyObject()->hdel(...\func_get_args());
  585. }
  586. public function hincrby(mixed $key, mixed $member, int $value): Cluster|false|int
  587. {
  588. return $this->initializeLazyObject()->hincrby(...\func_get_args());
  589. }
  590. public function hincrbyfloat(mixed $key, mixed $member, float $value): Cluster|bool|float
  591. {
  592. return $this->initializeLazyObject()->hincrbyfloat(...\func_get_args());
  593. }
  594. public function incr(mixed $key, int $by = 1): Cluster|false|int
  595. {
  596. return $this->initializeLazyObject()->incr(...\func_get_args());
  597. }
  598. public function decr(mixed $key, int $by = 1): Cluster|false|int
  599. {
  600. return $this->initializeLazyObject()->decr(...\func_get_args());
  601. }
  602. public function incrby(mixed $key, int $value): Cluster|false|int
  603. {
  604. return $this->initializeLazyObject()->incrby(...\func_get_args());
  605. }
  606. public function decrby(mixed $key, int $value): Cluster|false|int
  607. {
  608. return $this->initializeLazyObject()->decrby(...\func_get_args());
  609. }
  610. public function incrbyfloat(mixed $key, float $value): Cluster|false|float
  611. {
  612. return $this->initializeLazyObject()->incrbyfloat(...\func_get_args());
  613. }
  614. public function sdiff(mixed $key, mixed ...$other_keys): Cluster|array|false
  615. {
  616. return $this->initializeLazyObject()->sdiff(...\func_get_args());
  617. }
  618. public function sdiffstore(mixed $key, mixed ...$other_keys): Cluster|false|int
  619. {
  620. return $this->initializeLazyObject()->sdiffstore(...\func_get_args());
  621. }
  622. public function sinter(mixed $key, mixed ...$other_keys): Cluster|array|false
  623. {
  624. return $this->initializeLazyObject()->sinter(...\func_get_args());
  625. }
  626. public function sintercard(array $keys, int $limit = -1): Cluster|false|int
  627. {
  628. return $this->initializeLazyObject()->sintercard(...\func_get_args());
  629. }
  630. public function sinterstore(mixed $key, mixed ...$other_keys): Cluster|false|int
  631. {
  632. return $this->initializeLazyObject()->sinterstore(...\func_get_args());
  633. }
  634. public function sunion(mixed $key, mixed ...$other_keys): Cluster|array|false
  635. {
  636. return $this->initializeLazyObject()->sunion(...\func_get_args());
  637. }
  638. public function sunionstore(mixed $key, mixed ...$other_keys): Cluster|false|int
  639. {
  640. return $this->initializeLazyObject()->sunionstore(...\func_get_args());
  641. }
  642. public function subscribe(array $channels, callable $callback): bool
  643. {
  644. return $this->initializeLazyObject()->subscribe(...\func_get_args());
  645. }
  646. public function unsubscribe(array $channels = []): bool
  647. {
  648. return $this->initializeLazyObject()->unsubscribe(...\func_get_args());
  649. }
  650. public function psubscribe(array $patterns, callable $callback): bool
  651. {
  652. return $this->initializeLazyObject()->psubscribe(...\func_get_args());
  653. }
  654. public function punsubscribe(array $patterns = []): bool
  655. {
  656. return $this->initializeLazyObject()->punsubscribe(...\func_get_args());
  657. }
  658. public function ssubscribe(array $channels, callable $callback): bool
  659. {
  660. return $this->initializeLazyObject()->ssubscribe(...\func_get_args());
  661. }
  662. public function sunsubscribe(array $channels = []): bool
  663. {
  664. return $this->initializeLazyObject()->sunsubscribe(...\func_get_args());
  665. }
  666. public function touch(array|string $key_or_array, mixed ...$more_keys): Cluster|false|int
  667. {
  668. return $this->initializeLazyObject()->touch(...\func_get_args());
  669. }
  670. public function multi(int $mode = Relay::MULTI): Cluster|bool
  671. {
  672. return $this->initializeLazyObject()->multi(...\func_get_args());
  673. }
  674. public function exec(): array|false
  675. {
  676. return $this->initializeLazyObject()->exec(...\func_get_args());
  677. }
  678. public function watch(mixed $key, mixed ...$other_keys): Cluster|bool
  679. {
  680. return $this->initializeLazyObject()->watch(...\func_get_args());
  681. }
  682. public function unwatch(): Cluster|bool
  683. {
  684. return $this->initializeLazyObject()->unwatch(...\func_get_args());
  685. }
  686. public function discard(): bool
  687. {
  688. return $this->initializeLazyObject()->discard(...\func_get_args());
  689. }
  690. public function getMode(bool $masked = false): int
  691. {
  692. return $this->initializeLazyObject()->getMode(...\func_get_args());
  693. }
  694. public function scan(mixed &$iterator, array|string $key_or_address, mixed $match = null, int $count = 0, ?string $type = null): array|false
  695. {
  696. return $this->initializeLazyObject()->scan($iterator, ...\array_slice(\func_get_args(), 1));
  697. }
  698. public function hscan(mixed $key, mixed &$iterator, mixed $match = null, int $count = 0): array|false
  699. {
  700. return $this->initializeLazyObject()->hscan($key, $iterator, ...\array_slice(\func_get_args(), 2));
  701. }
  702. public function sscan(mixed $key, mixed &$iterator, mixed $match = null, int $count = 0): array|false
  703. {
  704. return $this->initializeLazyObject()->sscan($key, $iterator, ...\array_slice(\func_get_args(), 2));
  705. }
  706. public function zscan(mixed $key, mixed &$iterator, mixed $match = null, int $count = 0): array|false
  707. {
  708. return $this->initializeLazyObject()->zscan($key, $iterator, ...\array_slice(\func_get_args(), 2));
  709. }
  710. public function zscore(mixed $key, mixed $member): Cluster|float|false
  711. {
  712. return $this->initializeLazyObject()->zscore(...\func_get_args());
  713. }
  714. public function keys(mixed $pattern): Cluster|array|false
  715. {
  716. return $this->initializeLazyObject()->keys(...\func_get_args());
  717. }
  718. public function slowlog(array|string $key_or_address, string $operation, mixed ...$args): Cluster|array|bool|int
  719. {
  720. return $this->initializeLazyObject()->slowlog(...\func_get_args());
  721. }
  722. public function xadd(mixed $key, string $id, array $values, int $maxlen = 0, bool $approx = false, bool $nomkstream = false): Cluster|string|false
  723. {
  724. return $this->initializeLazyObject()->xadd(...\func_get_args());
  725. }
  726. public function smembers(mixed $key): Cluster|array|false
  727. {
  728. return $this->initializeLazyObject()->smembers(...\func_get_args());
  729. }
  730. public function sismember(mixed $key, mixed $member): Cluster|bool
  731. {
  732. return $this->initializeLazyObject()->sismember(...\func_get_args());
  733. }
  734. public function smismember(mixed $key, mixed ...$members): Cluster|array|false
  735. {
  736. return $this->initializeLazyObject()->smismember(...\func_get_args());
  737. }
  738. public function srem(mixed $key, mixed $member, mixed ...$members): Cluster|false|int
  739. {
  740. return $this->initializeLazyObject()->srem(...\func_get_args());
  741. }
  742. public function sadd(mixed $key, mixed $member, mixed ...$members): Cluster|false|int
  743. {
  744. return $this->initializeLazyObject()->sadd(...\func_get_args());
  745. }
  746. public function sort(mixed $key, array $options = []): Cluster|array|false|int
  747. {
  748. return $this->initializeLazyObject()->sort(...\func_get_args());
  749. }
  750. public function sort_ro(mixed $key, array $options = []): Cluster|array|false|int
  751. {
  752. return $this->initializeLazyObject()->sort_ro(...\func_get_args());
  753. }
  754. public function smove(mixed $srckey, mixed $dstkey, mixed $member): Cluster|bool
  755. {
  756. return $this->initializeLazyObject()->smove(...\func_get_args());
  757. }
  758. public function spop(mixed $key, int $count = 1): mixed
  759. {
  760. return $this->initializeLazyObject()->spop(...\func_get_args());
  761. }
  762. public function srandmember(mixed $key, int $count = 1): mixed
  763. {
  764. return $this->initializeLazyObject()->srandmember(...\func_get_args());
  765. }
  766. public function scard(mixed $key): Cluster|false|int
  767. {
  768. return $this->initializeLazyObject()->scard(...\func_get_args());
  769. }
  770. public function script(array|string $key_or_address, string $operation, string ...$args): mixed
  771. {
  772. return $this->initializeLazyObject()->script(...\func_get_args());
  773. }
  774. public function strlen(mixed $key): Cluster|false|int
  775. {
  776. return $this->initializeLazyObject()->strlen(...\func_get_args());
  777. }
  778. public function hlen(mixed $key): Cluster|false|int
  779. {
  780. return $this->initializeLazyObject()->hlen(...\func_get_args());
  781. }
  782. public function llen(mixed $key): Cluster|false|int
  783. {
  784. return $this->initializeLazyObject()->llen(...\func_get_args());
  785. }
  786. public function xack(mixed $key, string $group, array $ids): Cluster|false|int
  787. {
  788. return $this->initializeLazyObject()->xack(...\func_get_args());
  789. }
  790. public function xclaim(mixed $key, string $group, string $consumer, int $min_idle, array $ids, array $options): Cluster|array|bool
  791. {
  792. return $this->initializeLazyObject()->xclaim(...\func_get_args());
  793. }
  794. public function xautoclaim(mixed $key, string $group, string $consumer, int $min_idle, string $start, int $count = -1, bool $justid = false): Cluster|array|bool
  795. {
  796. return $this->initializeLazyObject()->xautoclaim(...\func_get_args());
  797. }
  798. public function xlen(mixed $key): Cluster|false|int
  799. {
  800. return $this->initializeLazyObject()->xlen(...\func_get_args());
  801. }
  802. public function xgroup(string $operation, mixed $key = null, ?string $group = null, ?string $id_or_consumer = null, bool $mkstream = false, int $entries_read = -2): mixed
  803. {
  804. return $this->initializeLazyObject()->xgroup(...\func_get_args());
  805. }
  806. public function xdel(mixed $key, array $ids): Cluster|false|int
  807. {
  808. return $this->initializeLazyObject()->xdel(...\func_get_args());
  809. }
  810. public function xinfo(string $operation, ?string $arg1 = null, ?string $arg2 = null, int $count = -1): mixed
  811. {
  812. return $this->initializeLazyObject()->xinfo(...\func_get_args());
  813. }
  814. public function xpending(mixed $key, string $group, ?string $start = null, ?string $end = null, int $count = -1, ?string $consumer = null, int $idle = 0): Cluster|array|false
  815. {
  816. return $this->initializeLazyObject()->xpending(...\func_get_args());
  817. }
  818. public function xrange(mixed $key, string $start, string $end, int $count = -1): Cluster|array|false
  819. {
  820. return $this->initializeLazyObject()->xrange(...\func_get_args());
  821. }
  822. public function xread(array $streams, int $count = -1, int $block = -1): Cluster|array|bool|null
  823. {
  824. return $this->initializeLazyObject()->xread(...\func_get_args());
  825. }
  826. public function xreadgroup(mixed $key, string $consumer, array $streams, int $count = 1, int $block = 1): Cluster|array|bool|null
  827. {
  828. return $this->initializeLazyObject()->xreadgroup(...\func_get_args());
  829. }
  830. public function xrevrange(mixed $key, string $end, string $start, int $count = -1): Cluster|array|bool
  831. {
  832. return $this->initializeLazyObject()->xrevrange(...\func_get_args());
  833. }
  834. public function xtrim(mixed $key, string $threshold, bool $approx = false, bool $minid = false, int $limit = -1): Cluster|false|int
  835. {
  836. return $this->initializeLazyObject()->xtrim(...\func_get_args());
  837. }
  838. public function zadd(mixed $key, mixed ...$args): mixed
  839. {
  840. return $this->initializeLazyObject()->zadd(...\func_get_args());
  841. }
  842. public function zrandmember(mixed $key, ?array $options = null): mixed
  843. {
  844. return $this->initializeLazyObject()->zrandmember(...\func_get_args());
  845. }
  846. public function zrange(mixed $key, string $start, string $end, mixed $options = null): Cluster|array|false
  847. {
  848. return $this->initializeLazyObject()->zrange(...\func_get_args());
  849. }
  850. public function zrevrange(mixed $key, int $start, int $end, mixed $options = null): Cluster|array|false
  851. {
  852. return $this->initializeLazyObject()->zrevrange(...\func_get_args());
  853. }
  854. public function zrangebyscore(mixed $key, mixed $start, mixed $end, mixed $options = null): Cluster|array|false
  855. {
  856. return $this->initializeLazyObject()->zrangebyscore(...\func_get_args());
  857. }
  858. public function zrevrangebyscore(mixed $key, mixed $start, mixed $end, mixed $options = null): Cluster|array|false
  859. {
  860. return $this->initializeLazyObject()->zrevrangebyscore(...\func_get_args());
  861. }
  862. public function zrevrank(mixed $key, mixed $rank, bool $withscore = false): Cluster|array|int|false
  863. {
  864. return $this->initializeLazyObject()->zrevrank(...\func_get_args());
  865. }
  866. public function zrangestore(mixed $dstkey, mixed $srckey, mixed $start, mixed $end, mixed $options = null): Cluster|false|int
  867. {
  868. return $this->initializeLazyObject()->zrangestore(...\func_get_args());
  869. }
  870. public function zrank(mixed $key, mixed $rank, bool $withscore = false): Cluster|array|int|false
  871. {
  872. return $this->initializeLazyObject()->zrank(...\func_get_args());
  873. }
  874. public function zrangebylex(mixed $key, mixed $min, mixed $max, int $offset = -1, int $count = -1): Cluster|array|false
  875. {
  876. return $this->initializeLazyObject()->zrangebylex(...\func_get_args());
  877. }
  878. public function zrevrangebylex(mixed $key, mixed $max, mixed $min, int $offset = -1, int $count = -1): Cluster|array|false
  879. {
  880. return $this->initializeLazyObject()->zrevrangebylex(...\func_get_args());
  881. }
  882. public function zrem(mixed $key, mixed ...$args): Cluster|false|int
  883. {
  884. return $this->initializeLazyObject()->zrem(...\func_get_args());
  885. }
  886. public function zremrangebylex(mixed $key, mixed $min, mixed $max): Cluster|false|int
  887. {
  888. return $this->initializeLazyObject()->zremrangebylex(...\func_get_args());
  889. }
  890. public function zremrangebyrank(mixed $key, int $start, int $end): Cluster|false|int
  891. {
  892. return $this->initializeLazyObject()->zremrangebyrank(...\func_get_args());
  893. }
  894. public function zremrangebyscore(mixed $key, mixed $min, mixed $max): Cluster|false|int
  895. {
  896. return $this->initializeLazyObject()->zremrangebyscore(...\func_get_args());
  897. }
  898. public function zcard(mixed $key): Cluster|false|int
  899. {
  900. return $this->initializeLazyObject()->zcard(...\func_get_args());
  901. }
  902. public function zcount(mixed $key, mixed $min, mixed $max): Cluster|false|int
  903. {
  904. return $this->initializeLazyObject()->zcount(...\func_get_args());
  905. }
  906. public function zdiff(array $keys, ?array $options = null): Cluster|array|false
  907. {
  908. return $this->initializeLazyObject()->zdiff(...\func_get_args());
  909. }
  910. public function zdiffstore(mixed $dstkey, array $keys): Cluster|false|int
  911. {
  912. return $this->initializeLazyObject()->zdiffstore(...\func_get_args());
  913. }
  914. public function zincrby(mixed $key, float $score, mixed $member): Cluster|false|float
  915. {
  916. return $this->initializeLazyObject()->zincrby(...\func_get_args());
  917. }
  918. public function zlexcount(mixed $key, mixed $min, mixed $max): Cluster|false|int
  919. {
  920. return $this->initializeLazyObject()->zlexcount(...\func_get_args());
  921. }
  922. public function zmscore(mixed $key, mixed ...$members): Cluster|array|false
  923. {
  924. return $this->initializeLazyObject()->zmscore(...\func_get_args());
  925. }
  926. public function zinter(array $keys, ?array $weights = null, mixed $options = null): Cluster|array|false
  927. {
  928. return $this->initializeLazyObject()->zinter(...\func_get_args());
  929. }
  930. public function zintercard(array $keys, int $limit = -1): Cluster|false|int
  931. {
  932. return $this->initializeLazyObject()->zintercard(...\func_get_args());
  933. }
  934. public function zinterstore(mixed $dstkey, array $keys, ?array $weights = null, mixed $options = null): Cluster|false|int
  935. {
  936. return $this->initializeLazyObject()->zinterstore(...\func_get_args());
  937. }
  938. public function zunion(array $keys, ?array $weights = null, mixed $options = null): Cluster|array|false
  939. {
  940. return $this->initializeLazyObject()->zunion(...\func_get_args());
  941. }
  942. public function zunionstore(mixed $dstkey, array $keys, ?array $weights = null, mixed $options = null): Cluster|false|int
  943. {
  944. return $this->initializeLazyObject()->zunionstore(...\func_get_args());
  945. }
  946. public function zpopmin(mixed $key, int $count = 1): Cluster|array|false
  947. {
  948. return $this->initializeLazyObject()->zpopmin(...\func_get_args());
  949. }
  950. public function zpopmax(mixed $key, int $count = 1): Cluster|array|false
  951. {
  952. return $this->initializeLazyObject()->zpopmax(...\func_get_args());
  953. }
  954. public function _getKeys(): array|false
  955. {
  956. return $this->initializeLazyObject()->_getKeys(...\func_get_args());
  957. }
  958. public function _masters(): array
  959. {
  960. return $this->initializeLazyObject()->_masters(...\func_get_args());
  961. }
  962. public function copy(mixed $srckey, mixed $dstkey, ?array $options = null): Cluster|bool
  963. {
  964. return $this->initializeLazyObject()->copy(...\func_get_args());
  965. }
  966. }