public final class Transaction extends GeneratedMessageV3 implements TransactionOrBuilder
A transaction.
Protobuf type google.spanner.v1.Transaction
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > TransactionImplements
TransactionOrBuilderStatic Fields
ID_FIELD_NUMBER
public static final int ID_FIELD_NUMBER
Type | Description |
int |
READ_TIMESTAMP_FIELD_NUMBER
public static final int READ_TIMESTAMP_FIELD_NUMBER
Type | Description |
int |
Static Methods
getDefaultInstance()
public static Transaction getDefaultInstance()
Type | Description |
Transaction |
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
newBuilder()
public static Transaction.Builder newBuilder()
Type | Description |
Transaction.Builder |
newBuilder(Transaction prototype)
public static Transaction.Builder newBuilder(Transaction prototype)
Name | Description |
prototype | Transaction |
Type | Description |
Transaction.Builder |
parseDelimitedFrom(InputStream input)
public static Transaction parseDelimitedFrom(InputStream input)
Name | Description |
input | InputStream |
Type | Description |
Transaction |
Type | Description |
IOException |
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static Transaction parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | InputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
Transaction |
Type | Description |
IOException |
parseFrom(byte[] data)
public static Transaction parseFrom(byte[] data)
Name | Description |
data | byte[] |
Type | Description |
Transaction |
Type | Description |
InvalidProtocolBufferException |
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Transaction parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Name | Description |
data | byte[] |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
Transaction |
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data)
public static Transaction parseFrom(ByteString data)
Name | Description |
data | ByteString |
Type | Description |
Transaction |
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Transaction parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Name | Description |
data | ByteString |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
Transaction |
Type | Description |
InvalidProtocolBufferException |
parseFrom(CodedInputStream input)
public static Transaction parseFrom(CodedInputStream input)
Name | Description |
input | CodedInputStream |
Type | Description |
Transaction |
Type | Description |
IOException |
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static Transaction parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
Transaction |
Type | Description |
IOException |
parseFrom(InputStream input)
public static Transaction parseFrom(InputStream input)
Name | Description |
input | InputStream |
Type | Description |
Transaction |
Type | Description |
IOException |
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static Transaction parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | InputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
Transaction |
Type | Description |
IOException |
parseFrom(ByteBuffer data)
public static Transaction parseFrom(ByteBuffer data)
Name | Description |
data | ByteBuffer |
Type | Description |
Transaction |
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Transaction parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Name | Description |
data | ByteBuffer |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
Transaction |
Type | Description |
InvalidProtocolBufferException |
parser()
public static Parser<Transaction> parser()
Type | Description |
Parser<Transaction> |
Methods
equals(Object obj)
public boolean equals(Object obj)
Name | Description |
obj | Object |
Type | Description |
boolean |
getDefaultInstanceForType()
public Transaction getDefaultInstanceForType()
Type | Description |
Transaction |
getId()
public ByteString getId()
id
may be used to identify the transaction in subsequent
Read,
ExecuteSql,
Commit, or
Rollback calls.
Single-use read-only transactions do not have IDs, because
single-use transactions do not support multiple requests.
bytes id = 1;
Type | Description |
ByteString | The id. |
getParserForType()
public Parser<Transaction> getParserForType()
Type | Description |
Parser<Transaction> |
getReadTimestamp()
public Timestamp getReadTimestamp()
For snapshot read-only transactions, the read timestamp chosen
for the transaction. Not returned by default: see
TransactionOptions.ReadOnly.return_read_timestamp.
A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
Example: "2014-10-02T15:01:23.045123456Z"
.
.google.protobuf.Timestamp read_timestamp = 2;
Type | Description |
Timestamp | The readTimestamp. |
getReadTimestampOrBuilder()
public TimestampOrBuilder getReadTimestampOrBuilder()
For snapshot read-only transactions, the read timestamp chosen
for the transaction. Not returned by default: see
TransactionOptions.ReadOnly.return_read_timestamp.
A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
Example: "2014-10-02T15:01:23.045123456Z"
.
.google.protobuf.Timestamp read_timestamp = 2;
Type | Description |
TimestampOrBuilder |
getSerializedSize()
public int getSerializedSize()
Type | Description |
int |
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Type | Description |
UnknownFieldSet |
hasReadTimestamp()
public boolean hasReadTimestamp()
For snapshot read-only transactions, the read timestamp chosen
for the transaction. Not returned by default: see
TransactionOptions.ReadOnly.return_read_timestamp.
A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
Example: "2014-10-02T15:01:23.045123456Z"
.
.google.protobuf.Timestamp read_timestamp = 2;
Type | Description |
boolean | Whether the readTimestamp field is set. |
hashCode()
public int hashCode()
Type | Description |
int |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
newBuilderForType()
public Transaction.Builder newBuilderForType()
Type | Description |
Transaction.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Transaction.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Name | Description |
parent | BuilderParent |
Type | Description |
Transaction.Builder |
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Name | Description |
unused | UnusedPrivateParameter |
Type | Description |
Object |
toBuilder()
public Transaction.Builder toBuilder()
Type | Description |
Transaction.Builder |
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Name | Description |
output | CodedOutputStream |
Type | Description |
IOException |