public final class Transaction
extends com.google.api.client.json.GenericJson
This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the Cloud Spanner API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json
com.google.api.client.util.GenericData.Flags
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
Transaction() |
Modifier and Type | Method and Description |
---|---|
Transaction |
clone() |
byte[] |
decodeId()
`id` may be used to identify the transaction in subsequent Read, ExecuteSql, Commit, or
Rollback calls.
|
Transaction |
encodeId(byte[] id)
`id` may be used to identify the transaction in subsequent Read, ExecuteSql, Commit, or
Rollback calls.
|
String |
getId()
`id` may be used to identify the transaction in subsequent Read, ExecuteSql, Commit, or
Rollback calls.
|
MultiplexedSessionPrecommitToken |
getPrecommitToken()
A precommit token is included in the response of a BeginTransaction request if the read-write
transaction is on a multiplexed session and a mutation_key was specified in the
BeginTransaction.
|
String |
getReadTimestamp()
For snapshot read-only transactions, the read timestamp chosen for the transaction.
|
Transaction |
set(String fieldName,
Object value) |
Transaction |
setId(String id)
`id` may be used to identify the transaction in subsequent Read, ExecuteSql, Commit, or
Rollback calls.
|
Transaction |
setPrecommitToken(MultiplexedSessionPrecommitToken precommitToken)
A precommit token is included in the response of a BeginTransaction request if the read-write
transaction is on a multiplexed session and a mutation_key was specified in the
BeginTransaction.
|
Transaction |
setReadTimestamp(String readTimestamp)
For snapshot read-only transactions, the read timestamp chosen for the transaction.
|
getFactory, setFactory, toPrettyString, toString
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
clear, containsKey, containsValue, isEmpty, keySet, size, values
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public String getId()
null
for nonedecodeId()
public byte[] decodeId()
null
for nonegetId()
public Transaction setId(String id)
id
- id or null
for none#encodeId()
public Transaction encodeId(byte[] id)
The value is encoded Base64 or {@code null} for none.
public MultiplexedSessionPrecommitToken getPrecommitToken()
null
for nonepublic Transaction setPrecommitToken(MultiplexedSessionPrecommitToken precommitToken)
precommitToken
- precommitToken or null
for nonepublic String getReadTimestamp()
null
for nonepublic Transaction setReadTimestamp(String readTimestamp)
readTimestamp
- readTimestamp or null
for nonepublic Transaction set(String fieldName, Object value)
set
in class com.google.api.client.json.GenericJson
public Transaction clone()
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2025 Google. All rights reserved.