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
Field Value | |
---|---|
Type | Description |
int |
READ_TIMESTAMP_FIELD_NUMBER
public static final int READ_TIMESTAMP_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
Static Methods
getDefaultInstance()
public static Transaction getDefaultInstance()
Returns | |
---|---|
Type | Description |
Transaction |
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
newBuilder()
public static Transaction.Builder newBuilder()
Returns | |
---|---|
Type | Description |
Transaction.Builder |
newBuilder(Transaction prototype)
public static Transaction.Builder newBuilder(Transaction prototype)
Parameter | |
---|---|
Name | Description |
prototype | Transaction |
Returns | |
---|---|
Type | Description |
Transaction.Builder |
parseDelimitedFrom(InputStream input)
public static Transaction parseDelimitedFrom(InputStream input)
Parameter | |
---|---|
Name | Description |
input | InputStream |
Returns | |
---|---|
Type | Description |
Transaction |
Exceptions | |
---|---|
Type | Description |
IOException |
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static Transaction parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | InputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
Transaction |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(byte[] data)
public static Transaction parseFrom(byte[] data)
Parameter | |
---|---|
Name | Description |
data | byte[] |
Returns | |
---|---|
Type | Description |
Transaction |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Transaction parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data | byte[] |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
Transaction |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data)
public static Transaction parseFrom(ByteString data)
Parameter | |
---|---|
Name | Description |
data | ByteString |
Returns | |
---|---|
Type | Description |
Transaction |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Transaction parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data | ByteString |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
Transaction |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(CodedInputStream input)
public static Transaction parseFrom(CodedInputStream input)
Parameter | |
---|---|
Name | Description |
input | CodedInputStream |
Returns | |
---|---|
Type | Description |
Transaction |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static Transaction parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
Transaction |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(InputStream input)
public static Transaction parseFrom(InputStream input)
Parameter | |
---|---|
Name | Description |
input | InputStream |
Returns | |
---|---|
Type | Description |
Transaction |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static Transaction parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | InputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
Transaction |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(ByteBuffer data)
public static Transaction parseFrom(ByteBuffer data)
Parameter | |
---|---|
Name | Description |
data | ByteBuffer |
Returns | |
---|---|
Type | Description |
Transaction |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Transaction parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data | ByteBuffer |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
Transaction |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parser()
public static Parser<Transaction> parser()
Returns | |
---|---|
Type | Description |
Parser<Transaction> |
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter | |
---|---|
Name | Description |
obj | Object |
Returns | |
---|---|
Type | Description |
boolean |
getDefaultInstanceForType()
public Transaction getDefaultInstanceForType()
Returns | |
---|---|
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;
Returns | |
---|---|
Type | Description |
ByteString | The id. |
getParserForType()
public Parser<Transaction> getParserForType()
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
Type | Description |
TimestampOrBuilder |
getSerializedSize()
public int getSerializedSize()
Returns | |
---|---|
Type | Description |
int |
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns | |
---|---|
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;
Returns | |
---|---|
Type | Description |
boolean | Whether the readTimestamp field is set. |
hashCode()
public int hashCode()
Returns | |
---|---|
Type | Description |
int |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
newBuilderForType()
public Transaction.Builder newBuilderForType()
Returns | |
---|---|
Type | Description |
Transaction.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Transaction.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter | |
---|---|
Name | Description |
parent | BuilderParent |
Returns | |
---|---|
Type | Description |
Transaction.Builder |
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter | |
---|---|
Name | Description |
unused | UnusedPrivateParameter |
Returns | |
---|---|
Type | Description |
Object |
toBuilder()
public Transaction.Builder toBuilder()
Returns | |
---|---|
Type | Description |
Transaction.Builder |
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter | |
---|---|
Name | Description |
output | CodedOutputStream |
Exceptions | |
---|---|
Type | Description |
IOException |