+
     hn{  c                   s   ^ RI t ^ RIHtHtHtHtHtHtHtH	t	H
t
HtHtHt ^ RIHt ^ RIHtHt ^ RIHtHtHtHtHtHtHt ^RIHtHtHtHtH t H!t!H"t"H#t#H$t$H%t%H&t&H't'H(t(H)t)H*t* ^RI+H,t, ^RI-H.t.H/t/ ]'       d   ^ R	I0H1t1 ]2! . R
NRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR-NR.NR/NR0NR1NR2N4      t3 ! R3 R4]4      t4 ! R5 R6]44      t5 ! R7 R8]'4      t6 ! R9 R:]6]!4      t7 ! R; R<]$4      t8 ! R= R>]8]4      t9 ! R? R@]4]6]])]8]*]%]&](]/4      t: ! RA RB]5]7]]9]#]] ]"].4      t;R# )Ci    N)TYPE_CHECKINGAnyAsyncIteratorDictIterableIteratorListLiteralMappingNoReturnOptionalUnion)key_slot)RedisClusterException
RedisError)AnyKeyTClusterCommandsProtocol
EncodableTKeysTKeyTPatternT	ResponseT)ACLCommandsAsyncACLCommandsAsyncDataAccessCommandsAsyncFunctionCommandsAsyncGearsCommandsAsyncManagementCommandsAsyncModuleCommandsAsyncScriptCommandsDataAccessCommandsFunctionCommandsGearsCommandsManagementCommandsModuleCommandsPubSubCommandsScriptCommands)list_or_args)AsyncRedisModuleCommandsRedisModuleCommands)TargetNodesTZBITCOUNTZBITPOSZEVAL_ROZ
EVALSHA_ROEXISTSZGEODISTZGEOHASHZGEOPOSZ	GEORADIUSZGEORADIUSBYMEMBERZGETZGETBITZGETRANGEZHEXISTSZHGETZHGETALLZHKEYSZHLENZHMGETZHSTRLENZHVALSZKEYSZLINDEXZLLENZLRANGEMGETZPTTLZ	RANDOMKEYZSCARDZSDIFFZSINTERZ	SISMEMBERZSMEMBERSZSRANDMEMBERZSTRLENZSUNIONZTTLZZCARDZZCOUNTZZRANGEZZSCOREc                   s   a  ] tR t^et o RtV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR	 ltV 3R
 lR lt	V 3R lR lt
V 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltRtV tR# )ClusterMultiKeyCommands;
A class containing commands that handle more than one key
c                s\   < V ^8  d   QhRS[ S[,          RS[S[S[S[,          3,          /#    keysreturn)r   r   r   intr   Zformat__classdict__   ";/usr/lib/python3.14/site-packages/redis/commands/cluster.py__annotate__$ClusterMultiKeyCommands.__annotate__j   s,      HTN tCdO?T     c                s    / pV FH  p\        V P                  P                  V4      4      pVP                  V. 4      P	                  V4       KJ  	  V# )z@Split keys into a dictionary that maps a slot to a list of keys.)r   encoderencode
setdefaultZappend)selfr/   slots_to_keyskeyslot   &&   r5   _partition_keys_by_slotZ/ClusterMultiKeyCommands._partition_keys_by_slotj   sO     CDLL//45D$$T2.55c:  r8   c                sb   < V ^8  d   QhRS[ S[S[3,          RS[S[S[S[,          3,          /# r.   mappingr0   )r   r   r   r   r1   r   r2   r4   r5   r6   r7   t   s6     
 
w
23
	c4
##	$
r8   c                s    / pVP                  4        FO  p\        V P                  P                  V^ ,          4      4      pVP	                  V. 4      P                  V4       KQ  	  V# )zBSplit pairs into a dictionary that maps a slot to a list of pairs.)itemsr   r9   r:   r;   Zextend)r<   rC   slots_to_pairsZpairr?   r@   r5   _partition_pairs_by_slotZ0ClusterMultiKeyCommands._partition_pairs_by_slott   sY    
 MMODDLL//Q89D%%dB/66t< $ r8   c                b   < V ^8  d   QhRS[ RS[S[S[S[,          3,          RS[S[,          /# r.   commandslots_to_argsr0   strr   r1   r   r   r   r   r2   r4   r5   r6   r7      s8      +238L3L+M	cr8   c                s*   V P                   ;'       d
    V\        9   pV P                  4       pVP                  4        UUu. uF5  w  rVVP                  ! V.VO5R V P
                  P                  WS4      ./ NK7  	   ppVP                  4       # u uppi target_nodes)read_from_replicasREAD_COMMANDSpipelinerD   execute_commandnodes_managerget_node_from_slotexecuter<   rI   rJ   rO   Zpiper?   Z	slot_args   &&&    r5   _execute_pipeline_by_slotZ1ClusterMultiKeyCommands._execute_pipeline_by_slot   s     "44QQM9Q}} $1#6#6#8		
 $9    &&99$S $9		
 ||~		
s   ;Bc          	      s   < V ^8  d   QhRS[ S[,          RS[S[S[ S[,          3,          RS[ S[,          RS[S[,          /# )r.   r/   rJ   	responsesr0   )r   r   r   r1   r   r   r   r2   r4   r5   r6   r7      sN     . .tn. sHZ$889. C=	.
 
c.r8   c           
     s    \        VP                  4       V4       UUUUu/ uF  w  rE\        WE4       F  w  rgWgbK	  	  K  	  pppppV U	u. uF  qV	,          NK  	  up	# u uppppi u up	i N)ZzipZvalues)
r<   r/   rJ   rY   Zslot_valuesZresponseZkZvZresultsr>   s
   &&&&      r5   _reorder_keys_by_commandZ0ClusterMultiKeyCommands._reorder_keys_by_command   sr     *-]-A-A-CY)O
)O%K2 D2 )O 	 

 )----

 .s   !A

A&c                L   < V ^8  d   QhRS[ RS[RS[S[S[,          ,          /# r.   r/   argsr0   r   r   r   r
   r   r2   r4   r5   r6   r7      s0     G G5 G G$x}:M Gr8   c                s    \        W4      pV P                  V4      pV P                  RV4      pV P                  WV4      # )  
Splits the keys into different slots and then calls MGET
for the keys of every slot. This operation will not be atomic
if keys belong to more than one slot.

Returns a list of values ordered identically to ``keys``

For more information see https://redis.io/commands/mget
r*   r%   rA   rX   r[   r<   r/   r^   r=   Zres   &&*  r5   mget_nonatomicZ&ClusterMultiKeyCommands.mget_nonatomic   sI     D' 44T: ,,V]C ,,T#FFr8   c                L   < V ^8  d   QhRS[ S[S[3,          RS[S[,          /# rB   r   r   r   r   boolr2   r4   r5   r6   r7      s-     F Fggz.A&B FtDz Fr8   c                sH    V P                  V4      pV P                  RV4      # )  
Sets key/values based on a mapping. Mapping is a dictionary of
key/value pairs. Both keys and values should be strings or types that
can be cast to a string via str().

Splits the keys into different slots and then calls MSET
for the keys of every slot. This operation will not be atomic
if keys belong to more than one slot.

For more information see https://redis.io/commands/mset
MSETrF   rX   r<   rC   rE      && r5   mset_nonatomicZ&ClusterMultiKeyCommands.mset_nonatomic   s)     66w? --fnEEr8   c                ,   < V ^8  d   QhRS[ RS[RS[/# r.   rI   r/   r0   rL   r   r1   r2   r4   r5   r6   r7      s'     
K 
K3 
Kt 
K 
Kr8   c                sX    V P                  V4      p\        V P                  W4      4      # )^
Runs the given command once for the keys
of each slot. Returns the sum of the return values.
rA   ZsumrX   r<   rI   r/   r=      &&* r5   _split_command_across_slotsZ3ClusterMultiKeyCommands._split_command_across_slots   s,     44T: 411'IJJr8   c                &   < V ^8  d   QhRS[ RS[/# r-   r   r   r2   r4   r5   r6   r7      s     A AD AY Ar8   c                *    V P                   ! R.VO5!  # )z
Returns the number of ``names`` that exist in the
whole cluster. The keys are first split up into slots
and then an EXISTS command is sent for every slot

For more information see https://redis.io/commands/exists
r)   ru   r<   r/      &*r5   existsZClusterMultiKeyCommands.exists   s     //@4@@r8   c                rv   r-   rw   r2   r4   r5   r6   r7      s     > >D >Y >r8   c                rx   )a  
Deletes the given keys in the cluster.
The keys are first split up into slots
and then an DEL command is sent for every slot

Non-existent keys are ignored.
Returns the number of keys that were deleted.

For more information see https://redis.io/commands/del
ZDELry   rz   r{   r5   deleteZClusterMultiKeyCommands.delete   s     //===r8   c                rv   r-   rw   r2   r4   r5   r6   r7      s     @ @4 @I @r8   c                rx   )a!  
Updates the last access time of given keys across the
cluster.

The keys are first split up into slots
and then an TOUCH command is sent for every slot

Non-existent keys are ignored.
Returns the number of keys that were touched.

For more information see https://redis.io/commands/touch
ZTOUCHry   rz   r{   r5   touchZClusterMultiKeyCommands.touch   s     //?$??r8   c                rv   r-   rw   r2   r4   r5   r6   r7      s     A AD AY Ar8   c                rx   )a  
Remove the specified keys in a different thread.

The keys are first split up into slots
and then an TOUCH command is sent for every slot

Non-existent keys are ignored.
Returns the number of keys that were unlinked.

For more information see https://redis.io/commands/unlink
ZUNLINKry   rz   r{   r5   unlinkZClusterMultiKeyCommands.unlink   s     //@4@@r8    N)__name__
__module____qualname____firstlineno____doc__rA   rF   rX   r[   rd   rm   ru   r|   r}   r~   r   __static_attributes____classdictcell__r3      @r5   r+   r+   e   s      
 
 ". .G G.F F&
K 
KA A> >@ @A Ar8   r+   c                   sl   a  ] tR tRt o RtV 3R lR ltV 3R lR ltV 3R lR ltV 3R	 lR
 ltRt	V t
R# )AsyncClusterMultiKeyCommandsi	  r,   c                r\   r]   r_   r2   r4   r5   r6   )AsyncClusterMultiKeyCommands.__annotate__  s0     G G Gt GXc]@S Gr8   c                s   "   \        W4      pV P                  V4      pV P                  RV4      G Rj  xL
 pV P                  WV4      #  L5i)r`   r*   Nra   rb   rc   r5   rd   Z+AsyncClusterMultiKeyCommands.mget_nonatomic  sU      D' 44T: 226=II ,,T#FF Js   2AAAc                re   rB   rf   r2   r4   r5   r6   r   %  s.     L LGGZ4G,H LTRVZ Lr8   c                sd   "   V P                  V4      pV P                  RV4      G Rj  xL
 #  L5i)rh   ri   Nrj   rk   rl   r5   rm   Z+AsyncClusterMultiKeyCommands.mset_nonatomic%  s2      66w? 33FNKKKKs   '0.0c                rn   ro   rp   r2   r4   r5   r6   r   8  s'     
Q 
Q 
QT 
Qc 
Qr8   c                st   "   V P                  V4      p\        V P                  W4      G Rj  xL
 4      #  L5i)rq   Nrr   rs   rt   r5   ru   Z8AsyncClusterMultiKeyCommands._split_command_across_slots8  s5      44T: 77OOPPOs   +86	8c                rG   rH   rK   r2   r4   r5   r6   r   D  s8     $ $$+238L3L+M$	c$r8   c                s  "   V P                   '       d   V P                  4       G R j  xL
  V P                  ;'       d
    V\        9   pV P	                  4       pVP                  4        UUu. uF5  w  rVVP                  ! V.VO5RV P                  P                  WS4      ./ NK7  	   ppVP                  4       G R j  xL
 #  Lu uppi  L5i)NrN   )
Z_initializeZ
initializerO   rP   rQ   rD   rR   rS   rT   rU   rV   rW   r5   rX   Z6AsyncClusterMultiKeyCommands._execute_pipeline_by_slotD  s      //###!44QQM9Q}} $1#6#6#8		
 $9    &&99$S $9		
 \\^## $		
 $s3   &CCC -C-;C(C>C?CCr   N)r   r   r   r   r   rd   rm   ru   rX   r   r   r   r   r5   r   r   	  s8     G G.L L&
Q 
Q$ $r8   r   c                   s  a  ] tR tRt o RtV 3R lR ltV 3R lR ltV 3R lR ltV 3R	 lR
 ltV 3R lR lt	V 3R lR lt
V 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltRCV 3R lR lltRCV 3R lR lltV 3R lR ltRCV 3R lR lltV 3R  lR! ltV 3R" lR# ltRDV 3R$ lR% lltRCV 3R& lR' lltV 3R( lR) ltRCV 3R* lR+ lltV 3R, lR- ltV 3R. lR/ ltRCV 3R0 lR1 lltRCV 3R2 lR3 lltRCR4 ltRCR5 ltV 3R6 lR7 ltRCV 3R8 lR9 llt RCV 3R: lR; llt!RCV 3R< lR= llt"RCV 3R> lR? llt#V 3R@ lRA lt$RBt%V t&R# )EClusterManagementCommandsiX  
A class for Redis Cluster management commands

The class inherits from Redis's core ManagementCommands class and do the
required adjustments to work with cluster mode
c                    < V ^8  d   QhRS[ /# r.   r0   r	   r2   r4   r5   r6   &ClusterManagementCommands.__annotate__`  s     P P( Pr8   c                    \        R4      h)z
Make the server a replica of another instance, or promote it as master.

For more information see https://redis.io/commands/slaveof
z(SLAVEOF is not supported in cluster moder   r<   r^   kwargs   &*,r5   slaveofZ!ClusterManagementCommands.slaveof`  s     $$NOOr8   c                r   r   r   r2   r4   r5   r6   r   h  s     R RH Rr8   c                r   )z
Make the server a replica of another instance, or promote it as master.

For more information see https://redis.io/commands/replicaof
z*REPLICAOF is not supported in cluster moder   r   r   r5   	replicaofZ#ClusterManagementCommands.replicaofh  s     $$PQQr8   c                r   r   r   r2   r4   r5   r6   r   p  s     O O Or8   c                r   )zW
Swaps two Redis databases.

For more information see https://redis.io/commands/swapdb
z'SWAPDB is not supported in cluster moder   r   r   r5   swapdbZ ClusterManagementCommands.swapdbp  s     $$MNNr8   c                $   < V ^8  d   QhRRRS[ /# r.   target_noder(   r0   r   r2   r4   r5   r6   r   x  s     	N 	N 	N9 	Nr8   c                (    V P                  RVR7      # )z
Returns the node's id.

:target_node: 'ClusterNode'
    The node to execute the command on

For more information check https://redis.io/commands/cluster-myid/
zCLUSTER MYIDrM   rR   r<   r      &&r5   cluster_myidZ&ClusterManagementCommands.cluster_myidx  s     ##N#MMr8   c                *   < V ^8  d   QhRRRS[ RS[/# r.   r   r(   slotsr0   r   r   r2   r4   r5   r6   r     s%     
 
)
3=
	
r8   c                .    V P                   ! R.VO5RV/ # )z
Assign new hash slots to receiving node. Sends to specified node.

:target_node: 'ClusterNode'
    The node to execute the command on

For more information see https://redis.io/commands/cluster-addslots
zCLUSTER ADDSLOTSrN   r   r<   r   r      &&*r5   cluster_addslotsZ*ClusterManagementCommands.cluster_addslots  s*     ##
!&
5@
 	
r8   c                r   r   r   r2   r4   r5   r6   r     s%     
 
)
3=
	
r8   c                r   )a  
Similar to the CLUSTER ADDSLOTS command.
The difference between the two commands is that ADDSLOTS takes a list of slots
to assign to the node, while ADDSLOTSRANGE takes a list of slot ranges
(specified by start and end slots) to assign to the node.

:target_node: 'ClusterNode'
    The node to execute the command on

For more information see https://redis.io/commands/cluster-addslotsrange
zCLUSTER ADDSLOTSRANGErN   r   r   r   r5   cluster_addslotsrangeZ/ClusterManagementCommands.cluster_addslotsrange  s*     ###
&+
:E
 	
r8   c                rv   r.   slot_idr0   r1   r   r2   r4   r5   r6   r     s     H Hs Hy Hr8   c                &    V P                  RV4      # )z
Return the number of local keys in the specified hash slot
Send to node based on specified slot_id

For more information see https://redis.io/commands/cluster-countkeysinslot
zCLUSTER COUNTKEYSINSLOTr   r<   r   r   r5   cluster_countkeysinslotZ1ClusterManagementCommands.cluster_countkeysinslot  s     ##$=wGGr8   c                rv   )r.   node_idr0   rL   r   r2   r4   r5   r6   r     s     N NC NI Nr8   c                r   )z
Return the number of failure reports active for a given node
Sends to a random node

For more information see https://redis.io/commands/cluster-count-failure-reports
zCLUSTER COUNT-FAILURE-REPORTSr   )r<   r   r   r5   cluster_count_failure_reportZ6ClusterManagementCommands.cluster_count_failure_report  s     ##$CWMMr8   c                6   < V ^8  d   QhRS[ RS[S[,          /# r.   r   r0   r   r   rg   r2   r4   r5   r6   r     s#     	R 	Rz 	Rd4j 	Rr8   c                sN    V Uu. uF  q P                  RV4      NK  	  up# u upi )
Set hash slots as unbound in the cluster.
It determines by it self what node the slot is in and sends it there

Returns a list of the results for each processed slot.

For more information see https://redis.io/commands/cluster-delslots
CLUSTER DELSLOTSr   )r<   r   r?   s   &* r5   cluster_delslotsZ*ClusterManagementCommands.cluster_delslots  s*     LQQ54$$%7>5QQQs   "c                rv   r   r   r2   r4   r5   r6   r     s     	E 	EJ 	E9 	Er8   c                rx   )a!  
Similar to the CLUSTER DELSLOTS command.
The difference is that CLUSTER DELSLOTS takes a list of hash slots to remove
from the node, while CLUSTER DELSLOTSRANGE takes a list of slot ranges to remove
from the node.

For more information see https://redis.io/commands/cluster-delslotsrange
zCLUSTER DELSLOTSRANGEr   r<   r   r{   r5   cluster_delslotsrangeZ/ClusterManagementCommands.cluster_delslotsrange  s     ##$;DeDDr8   Nc                s:   < V ^8  d   QhRRRS[ S[,          RS[/# )r.   r   r(   optionr0   )r
   rL   r   r2   r4   r5   r6   r     s.     V V)V3;C=V	Vr8   c                s    V'       d7   VP                  4       R9  d   \        RV 24      hV P                  RW!R7      # V P                  RVR7      # )z
Forces a slave to perform a manual failover of its master
Sends to specified node

:target_node: 'ClusterNode'
    The node to execute the command on

For more information see https://redis.io/commands/cluster-failover
z-Invalid option for CLUSTER FAILOVER command: zCLUSTER FAILOVERrM   )ZFORCEZTAKEOVER)upperr   rR   )r<   r   r      &&&r5   cluster_failoverZ*ClusterManagementCommands.cluster_failover  se     ||~%:: CF8L  ++& ,   ''(:'UUr8   c                4   < V ^8  d   QhRS[ R,          RS[/# r.   rN   r(   r0   r
   r   r2   r4   r5   r6   r     s$     O O.)A OY Or8   c                r   )z
Provides info about Redis Cluster node state.
The command will be sent to a random node in the cluster if no target
node is specified.

For more information see https://redis.io/commands/cluster-info
zCLUSTER INFOrM   r   r<   rN   r   r5   cluster_infoZ&ClusterManagementCommands.cluster_info  s     ##N#NNr8   c                rv   )r.   r>   r0   r   r2   r4   r5   r6   r     s     < <3 <9 <r8   c                r   )z
Returns the hash slot of the specified key
Sends to random node in the cluster

For more information see https://redis.io/commands/cluster-keyslot
zCLUSTER KEYSLOTr   )r<   r>   r   r5   cluster_keyslotZ)ClusterManagementCommands.cluster_keyslot  s     ##$5s;;r8   c                s@   < V ^8  d   QhRS[ RS[RS[R,          RS[/# )r.   hostportrN   r(   r0   )rL   r1   r
   r   r2   r4   r5   r6   r     s2     
 

"
2:>2J
	
r8   c                s*    V P                  RWVR7      # )z
Force a node cluster to handshake with another node.
Sends to specified node.

For more information see https://redis.io/commands/cluster-meet
zCLUSTER MEETrM   r   )r<   r   r   rN   s   &&&&r5   cluster_meetZ&ClusterManagementCommands.cluster_meet  s#     ##D\ $ 
 	
r8   c                r   r   r   r2   r4   r5   r6   r     s     5 5y 5r8   c                s$    V P                  R4      # )z
Get Cluster config for the node.
Sends to random node in the cluster

For more information see https://redis.io/commands/cluster-nodes
zCLUSTER NODESr   )r<   s   &r5   cluster_nodesZ'ClusterManagementCommands.cluster_nodes  s     ##O44r8   c                r   )r.   rN   r(   r   r0   r   r2   r4   r5   r6   r     s%     

 

*

58

	

r8   c                s(    V P                  RW!R7      # )z
Reconfigure a node as a slave of the specified master node

For more information see https://redis.io/commands/cluster-replicate
zCLUSTER REPLICATErM   r   )r<   rN   r   r   r5   cluster_replicateZ+ClusterManagementCommands.cluster_replicate  s!     ## $ 
 	
r8   c                :   < V ^8  d   QhRS[ RS[R,          RS[/# )r.   softrN   r(   r0   )rg   r
   r   r2   r4   r5   r6   r     s*     
 

/7/G
	
r8   c                sJ    T P                  RV'       d	   RVR7      # RVR7      # )z
Reset a Redis Cluster node

If 'soft' is True then it will send 'SOFT' argument
If 'soft' is False then it will send 'HARD' argument

For more information see https://redis.io/commands/cluster-reset
zCLUSTER RESETs   SOFTs   HARDrM   r   )r<   r   rN   r   r5   cluster_resetZ'ClusterManagementCommands.cluster_reset  s9     ##W $ 
 	
29 $ 
 	
r8   c                r   r   r   r2   r4   r5   r6   r   (  s&     U U$^4U	Ur8   c                r   )zv
Forces the node to save cluster state on disk

For more information see https://redis.io/commands/cluster-saveconfig
zCLUSTER SAVECONFIGrM   r   r   r   r5   cluster_save_configZ-ClusterManagementCommands.cluster_save_config(  s     ##$8|#TTr8   c                s,   < V ^8  d   QhRS[ RS[ RS[/# )r.   r?   num_keysr0   r   r2   r4   r5   r6   r   2  s'     M MS MC MI Mr8   c                s&    V P                  RW4      # )z
Returns the number of keys in the specified cluster slot

For more information see https://redis.io/commands/cluster-getkeysinslot
zCLUSTER GETKEYSINSLOTr   )r<   r?   r   r   r5   cluster_get_keys_in_slotZ2ClusterManagementCommands.cluster_get_keys_in_slot2  s     ##$;TLLr8   c                r   )r.   epochrN   r(   r0   )r1   r
   r   r2   r4   r5   r6   r   :  s*     

 



(0(@

	

r8   c                (    V P                  RWR7      # )zx
Set the configuration epoch in a new node

For more information see https://redis.io/commands/cluster-set-config-epoch
zCLUSTER SET-CONFIG-EPOCHrM   r   )r<   r   rN   r   r5   cluster_set_config_epochZ2ClusterManagementCommands.cluster_set_config_epoch:  s!     ##& $ 
 	
r8   c          
      s6   < V ^8  d   QhRRRS[ RS[RS[ RS[/# )r.   r   r(   r   r   stater0   )rL   r1   r   r2   r4   r5   r6   r   F  s5     = =)=47=BE=NQ=	=r8   c                s    VP                  4       R9   d   V P                  RW4W!R7      # VP                  4       R8X  d   \        R4      h\        RV 24      h)z
Bind an hash slot to a specific node

:target_node: 'ClusterNode'
    The node to execute the command on

For more information see https://redis.io/commands/cluster-setslot
CLUSTER SETSLOTrM   STABLEz4For "stable" state please use cluster_setslot_stablezInvalid slot state: )Z	IMPORTINGZNODEZ	MIGRATING)r   rR   r   )r<   r   r   r   r   s   &&&&&r5   cluster_setslotZ)ClusterManagementCommands.cluster_setslotF  sa     ;;=>>''!77 (   [[]h&VWW3E7;<<r8   c                rv   r   r   r2   r4   r5   r6   r   Z  s     J Jc Ji Jr8   c                s(    V P                  RVR4      # )z
Clears migrating / importing state from the slot.
It determines by it self what node the slot is in and sends it there.

For more information see https://redis.io/commands/cluster-setslot
r   r   r   r   r   r5   cluster_setslot_stableZ0ClusterManagementCommands.cluster_setslot_stableZ  s     ##$5wIIr8   c                r   )r.   r   rN   r(   r0   )rL   r
   r   r2   r4   r5   r6   r   c  s*     
 

*2>*B
	
r8   c                r   )z
Provides a list of replica nodes replicating from the specified primary
target node.

For more information see https://redis.io/commands/cluster-replicas
zCLUSTER REPLICASrM   r   )r<   r   rN   r   r5   cluster_replicasZ*ClusterManagementCommands.cluster_replicasc  s!     ## $ 
 	
r8   c                r   r   r   r2   r4   r5   r6   r   p  s$     P P(>*B Pi Pr8   c                r   )zn
Get array of Cluster slot to node mappings

For more information see https://redis.io/commands/cluster-slots
zCLUSTER SLOTSrM   r   r   r   r5   cluster_slotsZ'ClusterManagementCommands.cluster_slotsp  s     ##O,#OOr8   c                r   )zu
Returns details about the shards of the cluster.

For more information see https://redis.io/commands/cluster-shards
zCLUSTER SHARDSrM   r   r   r   r5   cluster_shardsZ(ClusterManagementCommands.cluster_shardsx  s     ##$4<#PPr8   c                r   )zj
Returns the shard ID of the node.

For more information see https://redis.io/commands/cluster-myshardid/
zCLUSTER MYSHARDIDrM   r   r   r   r5   cluster_myshardidZ+ClusterManagementCommands.cluster_myshardid  s     ##$7l#SSr8   c                r   r   r   r2   r4   r5   r6   r     s     
O 
O 
OI 
Or8   c                r   )aV  
Each node in a Redis Cluster maintains a pair of long-lived TCP link with each
peer in the cluster: One for sending outbound messages towards the peer and one
for receiving inbound messages from the peer.

This command outputs information of all such peer links as an array.

For more information see https://redis.io/commands/cluster-links
zCLUSTER LINKSrM   r   r   r   r5   cluster_linksZ'ClusterManagementCommands.cluster_links  s     ##O+#NNr8   c                2   < V ^8  d   QhRS[ R,          RR/# r.   rN   r(   r0   Nr
   r2   r4   r5   r6   r     s!     
 
x/G 
SW 
r8   c                    \        R 4      h)zBCLUSTER FLUSHSLOTS is intentionally not implemented in the client.ZNotImplementedErrorr   r   r5   cluster_flushslotsZ,ClusterManagementCommands.cluster_flushslots  s    !P
 	
r8   c                r   r   r   r2   r4   r5   r6   r     s!     
 
h~.F 
RV 
r8   c                r   )zACLUSTER BUMPEPOCH is intentionally not implemented in the client.r   r   r   r5   cluster_bumpepochZ+ClusterManagementCommands.cluster_bumpepoch  s    !O
 	
r8   c                r   r   r   r2   r4   r5   r6   r     s$     K KXn%= K Kr8   c                sR    VR8X  g   VR8X  d   RV n         V P                  RVR7      # )z
Enables read queries.
The command will be sent to the default cluster node if target_nodes is
not specified.

For more information see https://redis.io/commands/readonly
ZreplicasZallTZREADONLYrM   rO   rR   r   r   r5   readonlyZ"ClusterManagementCommands.readonly  s3     :%)> '+D###J\#JJr8   c                r   r   r   r2   r4   r5   r6   r     s$     
L 
Lh~&> 
L) 
Lr8   c                s6    RV n         V P                  RVR7      # )z
Disables read queries.
The command will be sent to the default cluster node if target_nodes is
not specified.

For more information see https://redis.io/commands/readwrite
FZ	READWRITErM   r   r   r   r5   	readwriteZ#ClusterManagementCommands.readwrite  s"     #(##Kl#KKr8   c                r   r   r   r2   r4   r5   r6   r     s     M M Mr8   c                s&    V P                   ! R/ VB # )z\
On an OSS cluster, before executing any gears function, you must call this command. # noqa
)zREDISGEARS_2.REFRESHCLUSTERr   )r<   r   s   &,r5   gears_refresh_clusterZ/ClusterManagementCommands.gears_refresh_cluster  s     ##LVLLr8   )rO   rZ   )TN)'r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r5   r   r   X  sf    P PR RO O	N 	N
 

 
$H HN N	R 	R	E 	EV V0O O< <
 
5 5

 


 
U UM M

 

= =(J J
 
P PQT
O 
O
 


 

K K
L 
LM Mr8   r   c                   s6   a  ] tR tRt o RtV 3R lR ltRtV tR# )AsyncClusterManagementCommandsi  r   c                r   r   r   r2   r4   r5   r6   Z+AsyncClusterManagementCommands.__annotate__  s     
 
Z 
DJ 
r8   c                s\   a "   \         P                  ! V 3R lV 4       !  G Rj  xL
 #  L5i)r   c              3   sp   <"   T F+  p\         P                  ! SP                  R V4      4      x  K-  	  R# 5i)r   N)asyncioZcreate_taskrR   )Z.0r?   r<   s   & r5   Z	<genexpr>ZBAsyncClusterManagementCommands.cluster_delslots.<locals>.<genexpr>  s4      !D ##D$8$89KT$RSS!s   36N)r   Zgatherr   s   f*r5   r   Z/AsyncClusterManagementCommands.cluster_delslots  s0      ^^!
 
 	
 
s   ",*,r   N)r   r   r   r   r   r   r   r   r   r   r5   r   r     s     
 
r8   r   c                   s\   a a ] tR tRt oRtRV3R lV 3R llltR	V3R lR lltRtVtV ;t	# )
ClusterDataAccessCommandsi  
A class for Redis Cluster Data Access Commands

The class inherits from Redis's core DataAccessCommand class and do the
required adjustments to work with cluster mode
c                s   < V ^8  d   QhRS[ R,          RS[RS[RS[S[ R,          S[ R,          3,          RS[R	S[R
S[S[,          RS[RS[/	# )r.   algoZLCSvalue1value2specific_argumentstringsr/   lenidxminmatchlenwithmatchlenr0   )r   r   r   rg   r
   r1   r   r2   r4   r5   r6   &ClusterDataAccessCommands.__annotate__  s     -
 -
en-
 -
 	-

 !!3WV_!DE-
 -
 -
 c]-
 -
 
-
r8   c	           
     s   < V	P                  RR4      p
VR8X  d   V
f   Rp
V	P                  RV
/4       \        SV `  ! VVVVVVVV3/ V	B # )a'  
Implements complex algorithms that operate on strings.
Right now the only algorithm implemented is the LCS algorithm
(longest common substring). However new algorithms could be
implemented in the future.

``algo`` Right now must be LCS
``value1`` and ``value2`` Can be two strings or two keys
``specific_argument`` Specifying if the arguments to the algorithm
will be keys or strings. strings is the default.
``len`` Returns just the len of the match.
``idx`` Returns the match positions in each string.
``minmatchlen`` Restrict the list of matches to the ones of a given
minimal length. Can be provided only when ``idx`` set to True.
``withmatchlen`` Returns the matches with the len of the match.
Can be provided only when ``idx`` set to True.

For more information see https://redis.io/commands/stralgo
rN   Nr   zdefault-node)popZupdateZsuperstralgo)r<   r   r   r   r   r   r   r   r   r   rN   	__class__s   &&&&&&&&&, r5   r   Z!ClusterDataAccessCommands.stralgo  sk    > zz.$7	)l.B)L~|45w

 

 
	
r8   c                b   < V ^8  d   QhRS[ S[,          RS[ S[,          RS[ S[,          RS[/# r.   matchcount_typer0   )r
   r   r1   rL   r   r2   r4   r5   r6   r     s@     ! !!! }! }	! 
!r8   c              +  s~  "   V P                   ! RR VRVRV/VB w  rVT Rj  xL
  VP                  4        UUu/ uF  w  rxV^ 8w  g   K  WxbK  	  pppV'       d   VP                  4        Uu/ uF  qwV P                  VR7      bK  	  p	pVP	                  RR4       V'       d   VP                  4        F=  w  rxV P                   ! RRVR VRVRVRW,          /VB w  rT Rj  xL
  W,          WW&   K?  	  VP                  4        UUu/ uF  w  rxV^ 8w  g   K  WxbK  	  pppK  R# R#  ELu uppi u upi  LRu uppi 5ir   r   r   N)Z	node_namerN   cursorr   ZscanrD   r/   Zget_noder   )r<   r   r   r   r   cursorsdatanamer  nodescurs   &&&&,      r5   	scan_iterZ#ClusterDataAccessCommands.scan_iter  sX     		RRUR%R6R4;MMOSOLDvQR{<4<OSEL\\^T^T4==4=88^ET JJ~t,$+MMOLD $		 !%!#! $! $	!
 &+[! !!IC  $OO$'IGM %4 6=]]_5D\TRSLDL_     	S U $s\    D=D'D=D*
D*D=-D0D=$>D="D5#%D=D7D7
D=*D=7D=r   )r   FFNFNNN)
r   r   r   r   r   r   r  r   r   Z__classcell__)r   r3   s   @@r5   r   r     s$     -
 -
^! ! !r8   r   c                   s:   a  ] tR tRt o RtRV 3R lR lltRtV tR# )AsyncClusterDataAccessCommandsi5  r   Nc                r   r   )r
   r   r1   rL   r   r2   r4   r5   r6   Z+AsyncClusterDataAccessCommands.__annotate__?  s@     # #!# }# }	# 
#r8   c               s  "   V P                   ! RR VRVRV/VB G Rj  xL
 w  rVV F  pV5x  K
  	  VP                  4        UU	u/ uF  w  rV	^ 8w  g   K  WbK  	  ppp	V'       d   VP                  4        Uu/ uF  qV P                  VR7      bK  	  p
pVP	                  RR4       V'       d   VP                  4        FI  w  rV P                   ! RRV	R VRVRVRW,          /VB G Rj  xL
 w  rV F  pV5x  K
  	  W,          WX&   KK  	  VP                  4        UU	u/ uF  w  rV	^ 8w  g   K  WbK  	  ppp	K  R# R#  EL!u up	pi u upi  Lbu up	pi 5ir   r  )r<   r   r   r   r   r  r  Zvaluer  r  r  r  s   &&&&,       r5   r  Z(AsyncClusterDataAccessCommands.scan_iter?  sw     #iiXeX5XXQWXXEK  5<MMOSOLDvQR{<4<OSEL\\^T^T4==4=88^ET JJ~t,$+MMOLD&*ii '%'#' $' $	'
 &+[' !' !IC "&# "&$'IGM %4 6=]]_5D\TRSLDL_     Y T U!s]   ED?'EEEE9EE0:E*E+5E E0E6
EEEr   r	  )r   r   r   r   r   r  r   r   r   r   r5   r
  r
  5  s     # # #r8   r
  c                       ] tR tRtRtRtR# )RedisClusterCommandsie  [  
A class for all Redis Cluster commands

For key-based commands, the target node(s) will be internally determined
by the keys' hash slot.
Non-key-based commands can be executed with the 'target_nodes' argument to
target specific nodes. By default, if target_nodes is not specified, the
command will be executed on the default cluster node.

:param :target_nodes: type can be one of the followings:
    - nodes flag: ALL_NODES, PRIMARIES, REPLICAS, RANDOM
    - 'ClusterNode'
    - 'list(ClusterNodes)'
    - 'dict(any:clusterNodes)'

for example:
    r.cluster_info(target_nodes=RedisCluster.ALL_NODES)
r   Nr   r   r   r   r   r   r   r8   r5   r  r  e  s    r8   r  c                   r  )AsyncRedisClusterCommandsi  r  r   Nr  r   r8   r5   r  r    s    r8   r  )<r   Ztypingr    r   r   r   r   r   r   r   r   r	   r
   r   Z	redis.crcr   Zredis.exceptionsr   r   Zredis.typingr   r   r   r   r   r   r   Zcorer   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   Zhelpersr%   Zredismodulesr&   r'   Zredis.asyncio.clusterr(   Z	frozensetrP   r+   r   r   r   r   r
  r  r  r   r8   r5   <module>r     s        >      " " G2 *** 	* 		*
 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	*  	!*" 	#*$ 	%*& 	'*( 	)** 	+*, 	-*. 	/*0 	1*2 	3*4 	5*6 	7*8 	9*: 	;*< 	=*> 	?*@ 	A*B 	C*D 	E*F 	G*H 	I*J 	K*L 	M*N 	O*P 	Q*R 	S*,^aA5 aAHL$#: L$^dM 2 dMN
6
6X 2 Xv-6-`@ ""r8   