Class Session.Builder (6.77.0)

public static final class Session.Builder extends GeneratedMessageV3.Builder<Session.Builder> implements SessionOrBuilder

A session in the Cloud Spanner API.

Protobuf type google.spanner.v1.Session

Implements

SessionOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Session.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Session.Builder
Overrides

build()

public Session build()
Returns
Type Description
Session

buildPartial()

public Session buildPartial()
Returns
Type Description
Session

clear()

public Session.Builder clear()
Returns
Type Description
Session.Builder
Overrides

clearApproximateLastUseTime()

public Session.Builder clearApproximateLastUseTime()

Output only. The approximate timestamp when the session is last used. It is typically earlier than the actual last use time.

.google.protobuf.Timestamp approximate_last_use_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Session.Builder

clearCreateTime()

public Session.Builder clearCreateTime()

Output only. The timestamp when the session is created.

.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Session.Builder

clearCreatorRole()

public Session.Builder clearCreatorRole()

The database role which created this session.

string creator_role = 5;

Returns
Type Description
Session.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Session.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Session.Builder
Overrides

clearLabels()

public Session.Builder clearLabels()
Returns
Type Description
Session.Builder

clearMultiplexed()

public Session.Builder clearMultiplexed()

Optional. If true, specifies a multiplexed session. A multiplexed session may be used for multiple, concurrent read-only operations but can not be used for read-write transactions, partitioned reads, or partitioned queries. Multiplexed sessions can be created via CreateSession but not via BatchCreateSessions. Multiplexed sessions may not be deleted nor listed.

bool multiplexed = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Session.Builder

This builder for chaining.

clearName()

public Session.Builder clearName()

Output only. The name of the session. This is always system-assigned.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Session.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Session.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Session.Builder
Overrides

clone()

public Session.Builder clone()
Returns
Type Description
Session.Builder
Overrides

containsLabels(String key)

public boolean containsLabels(String key)

The labels for the session.

  • Label keys must be between 1 and 63 characters long and must conform to the following regular expression: a-z?.
  • Label values must be between 0 and 63 characters long and must conform to the regular expression (a-z?)?.
  • No more than 64 labels can be associated with a given session.

    See https://goo.gl/xmQnxf for more information on and examples of labels.

map<string, string> labels = 2;

Parameter
Name Description
key String