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

public sealed class 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
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
databaseNameDatabaseName

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

Returns
TypeDescription
SessionPool.SessionPoolSegmentKey

GetHashCode()

public override int GetHashCode()
Returns
TypeDescription
Int32
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
SessionPool.SessionPoolSegmentKey