Class SessionPoolManager (3.13.0)

public sealed 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.

Inheritance

Object > SessionPoolManager

Namespace

Google.Cloud.Spanner.Data

Assembly

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
TypeDescription
SessionPoolManager

SessionPoolOptions

public SessionPoolOptions SessionPoolOptions { get; }

The session pool options used for every SessionPool created by this session pool manager.

Property Value
TypeDescription
SessionPoolOptions

Methods

Create(SessionPoolOptions, Logger)

public static SessionPoolManager Create(SessionPoolOptions options, Logger logger = null)

Creates a SessionPoolManager with the specified options.

Parameters
NameDescription
optionsSessionPoolOptions

The options to use. Must not be null.

loggerLogger

The logger to use. May be null, in which case the default logger is used.

Returns
TypeDescription
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
NameDescription
optionsSessionPoolOptions

The options to use. Must not be null.

spannerSettingsSpannerSettings

The SpannerSettings to use. Must not be null.

Returns
TypeDescription
SessionPoolManager

A SessionPoolManager with the given options.