@@ -62,7 +62,7 @@ public partial class RedisNativeClient
6262 /// Used to manage connection pooling
6363 /// </summary>
6464 internal bool Active { get ; set ; }
65- internal PooledRedisClientManager ClientManager { get ; set ; }
65+ internal IHandleClientDispose ClientManager { get ; set ; }
6666
6767 internal long LastConnectedAtTimestamp ;
6868
@@ -82,6 +82,7 @@ public partial class RedisNativeClient
8282 public int SendTimeout { get ; set ; }
8383 public int ReceiveTimeout { get ; set ; }
8484 public string Password { get ; set ; }
85+ public string Client { get ; set ; }
8586 public int IdleTimeOutSecs { get ; set ; }
8687
8788 public Action < IRedisNativeClient > ConnectionFilter { get ; set ; }
@@ -138,9 +139,12 @@ private void Init(RedisEndpoint config)
138139 {
139140 Host = config . Host ;
140141 Port = config . Port ;
142+ ConnectTimeout = config . ConnectTimeout ;
141143 SendTimeout = config . SendTimeout ;
142144 ReceiveTimeout = config . ReceiveTimeout ;
143145 Password = config . Password ;
146+ NamespacePrefix = config . NamespacePrefix ;
147+ Client = config . Client ;
144148 Db = config . Db ;
145149 Ssl = config . Ssl ;
146150 IdleTimeOutSecs = config . IdleTimeOutSecs ;
@@ -249,7 +253,12 @@ public void ConfigResetStat()
249253 SendExpectSuccess ( Commands . Config , Commands . ResetStat ) ;
250254 }
251255
252- public byte [ ] [ ] Time ( )
256+ public void ConfigRewrite ( )
257+ {
258+ SendExpectSuccess ( Commands . Config , Commands . Rewrite ) ;
259+ }
260+
261+ public byte [ ] [ ] Time ( )
253262 {
254263 return SendExpectMultiData ( Commands . Time ) ;
255264 }
@@ -296,7 +305,7 @@ public long ObjectIdleTime(string key)
296305 return SendExpectLong ( Commands . Object , Commands . IdleTime , key . ToUtf8Bytes ( ) ) ;
297306 }
298307
299- public string Type ( string key )
308+ public string Type ( string key )
300309 {
301310 if ( key == null )
302311 throw new ArgumentNullException ( "key" ) ;
@@ -714,6 +723,11 @@ public void FlushAll()
714723 SendExpectSuccess ( Commands . FlushAll ) ;
715724 }
716725
726+ public RedisText Role ( )
727+ {
728+ return SendExpectComplexResponse ( Commands . Role ) . ToRedisText ( ) ;
729+ }
730+
717731 public string ClientGetName ( )
718732 {
719733 return SendExpectString ( Commands . Client , Commands . GetName ) ;
@@ -730,6 +744,11 @@ public void ClientSetName(string name)
730744 SendExpectSuccess ( Commands . Client , Commands . SetName , name . ToUtf8Bytes ( ) ) ;
731745 }
732746
747+ public void ClientPause ( int timeOutMs )
748+ {
749+ SendExpectSuccess ( Commands . Client , Commands . Pause , timeOutMs . ToUtf8Bytes ( ) ) ;
750+ }
751+
733752 public byte [ ] ClientList ( )
734753 {
735754 return SendExpectData ( Commands . Client , Commands . List ) ;
@@ -740,6 +759,40 @@ public void ClientKill(string clientAddr)
740759 SendExpectSuccess ( Commands . Client , Commands . Kill , clientAddr . ToUtf8Bytes ( ) ) ;
741760 }
742761
762+ public long ClientKill ( string addr = null , string id = null , string type = null , string skipMe = null )
763+ {
764+ var cmdWithArgs = new List < byte [ ] >
765+ {
766+ Commands . Client , Commands . Kill ,
767+ } ;
768+
769+ if ( addr != null )
770+ {
771+ cmdWithArgs . Add ( Commands . Addr ) ;
772+ cmdWithArgs . Add ( addr . ToUtf8Bytes ( ) ) ;
773+ }
774+
775+ if ( id != null )
776+ {
777+ cmdWithArgs . Add ( Commands . Id ) ;
778+ cmdWithArgs . Add ( id . ToUtf8Bytes ( ) ) ;
779+ }
780+
781+ if ( type != null )
782+ {
783+ cmdWithArgs . Add ( Commands . Type ) ;
784+ cmdWithArgs . Add ( type . ToUtf8Bytes ( ) ) ;
785+ }
786+
787+ if ( skipMe != null )
788+ {
789+ cmdWithArgs . Add ( Commands . SkipMe ) ;
790+ cmdWithArgs . Add ( skipMe . ToUtf8Bytes ( ) ) ;
791+ }
792+
793+ return SendExpectLong ( cmdWithArgs . ToArray ( ) ) ;
794+ }
795+
743796 public byte [ ] [ ] Keys ( string pattern )
744797 {
745798 if ( pattern == null )
0 commit comments