public sealed class SessionPoolManagerReference documentation and code samples for the Google.Cloud.Spanner.Data class SessionPoolManager.
Manages sessions used by SpannerConnection. This is rarely used directly by user code; it's public to provide flexibility when custom options are required.
Namespace
Google.Cloud.Spanner.DataAssembly
Google.Cloud.Spanner.Data.dll
Properties
Default
public static SessionPoolManager Default { get; }The default session pool manager, used by SpannerConnection unless a different pool is specified on construction.
| Property Value | |
|---|---|
| Type | Description |
SessionPoolManager |
|
SessionPoolOptions
public SessionPoolOptions SessionPoolOptions { get; }The session pool options used for every Google.Cloud.Spanner.V1.SessionPool created by this session pool manager.
| Property Value | |
|---|---|
| Type | Description |
Google.Cloud.Spanner.V1.SessionPoolOptions |
|
Methods
Create(SessionPoolOptions, Logger)
public static SessionPoolManager Create(SessionPoolOptions options, Logger logger = null)Creates a SessionPoolManager with the specified options.
| Parameters | |
|---|---|
| Name | Description |
options |
Google.Cloud.Spanner.V1.SessionPoolOptionsThe options to use. Must not be null. |
logger |
Google.Cloud.Spanner.V1.Internal.Logging.LoggerThe logger to use. May be null, in which case the default logger is used. |
| Returns | |
|---|---|
| Type | Description |
SessionPoolManager |
A SessionPoolManager with the given options. |
CreateWithSettings(SessionPoolOptions, SpannerSettings)
public static SessionPoolManager CreateWithSettings(SessionPoolOptions options, SpannerSettings spannerSettings)Creates a SessionPoolManager with the specified SpannerSettings and options.
| Parameters | |
|---|---|
| Name | Description |
options |
Google.Cloud.Spanner.V1.SessionPoolOptionsThe options to use. Must not be null. |
spannerSettings |
Google.Cloud.Spanner.V1.SpannerSettingsThe SpannerSettings to use. Must not be null. |
| Returns | |
|---|---|
| Type | Description |
SessionPoolManager |
A SessionPoolManager with the given options. |