-
Notifications
You must be signed in to change notification settings - Fork 140
/
SnowflakeDbSessionPool.cs
35 lines (23 loc) · 1.12 KB
/
SnowflakeDbSessionPool.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
* Copyright (c) 2024 Snowflake Computing Inc. All rights reserved.
*/
using System;
using Snowflake.Data.Core.Session;
namespace Snowflake.Data.Client
{
public class SnowflakeDbSessionPool
{
private readonly SessionPool _sessionPool;
internal SnowflakeDbSessionPool(SessionPool sessionPool)
=> _sessionPool = sessionPool ?? throw new NullReferenceException("SessionPool not provided!");
public bool GetPooling() => _sessionPool.GetPooling();
public int GetMinPoolSize() => _sessionPool.GetMinPoolSize();
public int GetMaxPoolSize() => _sessionPool.GetMaxPoolSize();
public int GetCurrentPoolSize() => _sessionPool.GetCurrentPoolSize();
public long GetExpirationTimeout() => _sessionPool.GetTimeout();
public long GetConnectionTimeout() => _sessionPool.GetConnectionTimeout();
public long GetWaitForIdleSessionTimeout() => _sessionPool.GetWaitForIdleSessionTimeout();
public void ClearPool() => _sessionPool.ClearSessions();
public ChangedSessionBehavior GetChangedSession() => _sessionPool.GetChangedSession();
}
}