Google Cloud Spanner v1 API - Class SessionPool.SessionPoolSegmentKey (5.0.0-beta02)

public sealed class SessionPool.SessionPoolSegmentKey : IEquatable<SessionPool.SessionPoolSegmentKey>

Reference documentation and code samples for the Google Cloud Spanner v1 API class SessionPool.SessionPoolSegmentKey.

Aspects under which a session pool is segmented.

Inheritance

object > SessionPool.SessionPoolSegmentKey

Namespace

Google.Cloud.Spanner.V1

Assembly

Google.Cloud.Spanner.V1.dll

Properties

DatabaseName

public DatabaseName DatabaseName { get; }

The database for which sessions are pooled on the associated session pool.

Property Value
TypeDescription
Google.Cloud.Spanner.Common.V1.DatabaseName

DatabaseRole

public string DatabaseRole { get; }

The database role of the sessions pooled on the associated session pool.

Property Value
TypeDescription
string

Methods

Create(DatabaseName)

public static SessionPool.SessionPoolSegmentKey Create(DatabaseName databaseName)

Creates a SessionPool.SessionPoolSegmentKey with the given database name.

Parameter
NameDescription
databaseNameGoogle.Cloud.Spanner.Common.V1.DatabaseName

The database name for the associated pool. Must not be null.

Returns
TypeDescription
SessionPoolSessionPoolSegmentKey

GetHashCode()

public override int GetHashCode()
Returns
TypeDescription
int
Overrides

ToString()

public override string ToString()
Returns
TypeDescription
string
Overrides

WithDatabaseRole(string)

public SessionPool.SessionPoolSegmentKey WithDatabaseRole(string databaseRole)

Creates a SessionPool.SessionPoolSegmentKey based on this one but with the given database role.

Parameter
NameDescription
databaseRolestring

The database role for the associated pool. May be null in which case the default (public) database role is used if fine grained access control is enabled; otherwise the database role is ignored.

Returns
TypeDescription
SessionPoolSessionPoolSegmentKey