Class: Google::Apis::SpannerV1::MultiplexedSessionPrecommitToken
- Inherits:
-
Object
- Object
- Google::Apis::SpannerV1::MultiplexedSessionPrecommitToken
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/spanner_v1/classes.rb,
lib/google/apis/spanner_v1/representations.rb,
lib/google/apis/spanner_v1/representations.rb
Overview
When a read-write transaction is executed on a multiplexed session, this precommit token is sent back to the client as a part of the [Transaction] message in the BeginTransaction response and also as a part of the [ResultSet] and [PartialResultSet] responses.
Instance Attribute Summary collapse
-
#precommit_token ⇒ String
Opaque precommit token.
-
#seq_num ⇒ Fixnum
An incrementing seq number is generated on every precommit token that is returned.
Instance Method Summary collapse
-
#initialize(**args) ⇒ MultiplexedSessionPrecommitToken
constructor
A new instance of MultiplexedSessionPrecommitToken.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ MultiplexedSessionPrecommitToken
Returns a new instance of MultiplexedSessionPrecommitToken.
4270 4271 4272 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 4270 def initialize(**args) update!(**args) end |
Instance Attribute Details
#precommit_token ⇒ String
Opaque precommit token.
Corresponds to the JSON property precommitToken
NOTE: Values are automatically base64 encoded/decoded in the client library.
4261 4262 4263 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 4261 def precommit_token @precommit_token end |
#seq_num ⇒ Fixnum
An incrementing seq number is generated on every precommit token that is
returned. Clients should remember the precommit token with the highest
sequence number from the current transaction attempt.
Corresponds to the JSON property seqNum
4268 4269 4270 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 4268 def seq_num @seq_num end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4275 4276 4277 4278 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 4275 def update!(**args) @precommit_token = args[:precommit_token] if args.key?(:precommit_token) @seq_num = args[:seq_num] if args.key?(:seq_num) end |