-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SNOW-1353952 GetPool interface driven with user/password
- Loading branch information
1 parent
43d8fd4
commit 48463c7
Showing
5 changed files
with
56 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright (c) 2024 Snowflake Computing Inc. All rights reserved. | ||
*/ | ||
using System; | ||
using Snowflake.Data.Core.Session; | ||
|
||
namespace Snowflake.Data.Client | ||
{ | ||
public class SnowflakeDbSessionPool : IDisposable | ||
{ | ||
private SessionPool _sessionPool; | ||
|
||
internal SnowflakeDbSessionPool(SessionPool sessionPool) | ||
=> _sessionPool = sessionPool ?? throw new NullReferenceException("SessionPool not provided!"); | ||
public void Dispose() => _sessionPool = null; | ||
|
||
public void SetMaxPoolSize(int size) => _sessionPool.SetMaxPoolSize(size); | ||
public int GetMaxPoolSize() => _sessionPool.GetMaxPoolSize(); | ||
|
||
public void SetTimeout(long seconds) => _sessionPool.SetTimeout(seconds); | ||
public long GetTimeout() => _sessionPool.GetTimeout(); | ||
|
||
public int GetCurrentPoolSize() => _sessionPool.GetCurrentPoolSize(); | ||
|
||
public bool SetPooling(bool isEnable) => _sessionPool.SetPooling(isEnable); | ||
public bool GetPooling() => _sessionPool.GetPooling(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters