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.
Implements
IEquatableSessionPoolSessionPoolSegmentKeyNamespace
Google.Cloud.Spanner.V1Assembly
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 | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Type | Description |
string |
|
Methods
Create(DatabaseName)
public static SessionPool.SessionPoolSegmentKey Create(DatabaseName databaseName)Creates a SessionPool.SessionPoolSegmentKey with the given database name.
| Parameter | |
|---|---|
| Name | Description |
databaseName |
Google.Cloud.Spanner.Common.V1.DatabaseNameThe database name for the associated pool. Must not be null. |
| Returns | |
|---|---|
| Type | Description |
SessionPoolSessionPoolSegmentKey |
|
GetHashCode()
public override int GetHashCode()| Returns | |
|---|---|
| Type | Description |
int |
|
ToString()
public override string ToString()| Returns | |
|---|---|
| Type | Description |
string |
|
WithDatabaseRole(string)
public SessionPool.SessionPoolSegmentKey WithDatabaseRole(string databaseRole)Creates a SessionPool.SessionPoolSegmentKey based on this one but with the given database role.
| Parameter | |
|---|---|
| Name | Description |
databaseRole |
stringThe 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 | |
|---|---|
| Type | Description |
SessionPoolSessionPoolSegmentKey |
|