@@ -54,12 +54,12 @@ public ServerSelectionStrategy(ConnectionMultiplexer multiplexer)
54
54
this . multiplexer = multiplexer ;
55
55
}
56
56
57
- public ServerType ServerType { get ; set ; } = ServerType . Standalone ;
58
- internal int TotalSlots => RedisClusterSlotCount ;
59
-
57
+ public ServerType ServerType { get ; set ; } = ServerType . Standalone ;
58
+ internal int TotalSlots => RedisClusterSlotCount ;
59
+
60
60
/// <summary>
61
61
/// Computes the hash-slot that would be used by the given key
62
- /// </summary>
62
+ /// </summary>
63
63
/// <param name="key">The <see cref="RedisKey"/> to determine a slot ID for.</param>
64
64
public unsafe int HashSlot ( RedisKey key )
65
65
{
@@ -131,13 +131,13 @@ public bool TryResend(int hashSlot, Message message, EndPoint endpoint, bool isM
131
131
var command = message . Command ;
132
132
switch ( Message . GetMasterSlaveFlags ( message . Flags ) )
133
133
{
134
- case CommandFlags . DemandMaster :
134
+ case CommandFlags . DemandMaster :
135
135
resendVia = server . IsSelectable ( command ) ? server : null ;
136
136
break ;
137
- case CommandFlags . PreferMaster :
137
+ case CommandFlags . PreferMaster :
138
138
resendVia = server . IsSelectable ( command ) ? server : FindSlave ( server , command ) ;
139
139
break ;
140
- case CommandFlags . PreferSlave :
140
+ case CommandFlags . PreferSlave :
141
141
resendVia = FindSlave ( server , command ) ?? ( server . IsSelectable ( command ) ? server : null ) ;
142
142
break ;
143
143
case CommandFlags . DemandSlave :
@@ -149,7 +149,7 @@ public bool TryResend(int hashSlot, Message message, EndPoint endpoint, bool isM
149
149
multiplexer . Trace ( "Unable to resend to " + endpoint ) ;
150
150
}
151
151
else
152
- {
152
+ {
153
153
message . PrepareToResend ( resendVia , isMoved ) ;
154
154
retry = resendVia . TryEnqueue ( message ) ;
155
155
}
@@ -182,7 +182,7 @@ internal int CombineSlot(int oldSlot, int newSlot)
182
182
if ( oldSlot == NoSlot ) return newSlot ;
183
183
return oldSlot == newSlot ? oldSlot : MultipleSlots ;
184
184
}
185
-
185
+
186
186
internal int CombineSlot ( int oldSlot , RedisKey key )
187
187
{
188
188
if ( oldSlot == MultipleSlots || key . IsNull ) return oldSlot ;
@@ -191,7 +191,7 @@ internal int CombineSlot(int oldSlot, RedisKey key)
191
191
if ( oldSlot == NoSlot ) return newSlot ;
192
192
return oldSlot == newSlot ? oldSlot : MultipleSlots ;
193
193
}
194
-
194
+
195
195
internal int CountCoveredSlots ( )
196
196
{
197
197
var arr = map ;
0 commit comments