33using System . Security . Cryptography . X509Certificates ;
44using Microsoft . Extensions . Logging ;
55using Microsoft . Extensions . Logging . Abstractions ;
6+ using Ydb . Sdk . Ado . Internal ;
67using Ydb . Sdk . Auth ;
78using Ydb . Sdk . Pool ;
89using Ydb . Sdk . Transport ;
@@ -29,6 +30,8 @@ private void InitDefaultValues()
2930 _port = YdbAdoDefaultSettings . Port ;
3031 _database = YdbAdoDefaultSettings . Database ;
3132 _maxSessionPool = SessionPoolDefaultSettings . MaxSessionPool ;
33+ _minSessionPool = 0 ;
34+ _sessionIdleTimeout = 300 ;
3235 _useTls = YdbAdoDefaultSettings . UseTls ;
3336 _connectTimeout = GrpcDefaultSettings . ConnectTimeoutSeconds ;
3437 _keepAlivePingDelay = GrpcDefaultSettings . KeepAlivePingSeconds ;
@@ -123,6 +126,40 @@ public int MaxSessionPool
123126
124127 private int _maxSessionPool ;
125128
129+ public int MinSessionPool
130+ {
131+ get => _minSessionPool ;
132+ set
133+ {
134+ if ( value <= 0 )
135+ {
136+ throw new ArgumentOutOfRangeException ( nameof ( value ) , value , "Invalid min session pool: " + value ) ;
137+ }
138+
139+ _minSessionPool = value ;
140+ SaveValue ( nameof ( MinSessionPool ) , value ) ;
141+ }
142+ }
143+
144+ private int _minSessionPool ;
145+
146+ public int SessionIdleTimeout
147+ {
148+ get => _sessionIdleTimeout ;
149+ set
150+ {
151+ if ( value < 0 )
152+ {
153+ throw new ArgumentOutOfRangeException ( nameof ( value ) , value , "Invalid session idle timeout: " + value ) ;
154+ }
155+
156+ _sessionIdleTimeout = value ;
157+ SaveValue ( nameof ( SessionIdleTimeout ) , value ) ;
158+ }
159+ }
160+
161+ private int _sessionIdleTimeout ;
162+
126163 public bool UseTls
127164 {
128165 get => _useTls ;
0 commit comments