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.Data
Assembly: Google.Cloud.Spanner.Data.dll
Syntax
public sealed class SessionPoolManager
Properties
Default
The default session pool manager, used by SpannerConnection unless a different pool is specified on construction.
Declaration
public static SessionPoolManager Default { get; }
Property Value
Type | Description |
---|---|
SessionPoolManager |
SessionPoolOptions
The session pool options used for every Google.Cloud.Spanner.V1.SessionPool created by this session pool manager.
Declaration
public SessionPoolOptions SessionPoolOptions { get; }
Property Value
Type | Description |
---|---|
SessionPoolOptions |
Methods
Create(SessionPoolOptions, Logger)
Creates a SessionPoolManager with the specified options.
Declaration
public static SessionPoolManager Create(SessionPoolOptions options, Logger logger = null)
Parameters
Type | Name | Description |
---|---|---|
SessionPoolOptions | options | The options to use. Must not be null. |
Logger | logger | The 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)
Creates a SessionPoolManager with the specified SpannerSettings and options.
Declaration
public static SessionPoolManager CreateWithSettings(SessionPoolOptions options, SpannerSettings spannerSettings)
Parameters
Type | Name | Description |
---|---|---|
SessionPoolOptions | options | The options to use. Must not be null. |
SpannerSettings | spannerSettings | The SpannerSettings to use. Must not be null. |
Returns
Type | Description |
---|---|
SessionPoolManager | A SessionPoolManager with the given options. |