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.
Implements
IEquatable<SessionPool.SessionPoolSegmentKey>Namespace
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 |
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 | DatabaseName The database name for the associated pool. Must not be null. |
Returns | |
---|---|
Type | Description |
SessionPool.SessionPoolSegmentKey |
GetHashCode()
public override int GetHashCode()
Returns | |
---|---|
Type | Description |
Int32 |
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 | String 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 | |
---|---|
Type | Description |
SessionPool.SessionPoolSegmentKey |