Class TransactionOptions (2.17.6)

public final class TransactionOptions extends GeneratedMessageV3 implements TransactionOptionsOrBuilder

Options for beginning a new transaction.

Transactions can be created explicitly with calls to Datastore.BeginTransaction or implicitly by setting ReadOptions.new_transaction in read requests.

Protobuf type google.datastore.v1.TransactionOptions

Static Fields

READ_ONLY_FIELD_NUMBER

public static final int READ_ONLY_FIELD_NUMBER
Field Value
TypeDescription
int

READ_WRITE_FIELD_NUMBER

public static final int READ_WRITE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static TransactionOptions getDefaultInstance()
Returns
TypeDescription
TransactionOptions

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static TransactionOptions.Builder newBuilder()
Returns
TypeDescription
TransactionOptions.Builder

newBuilder(TransactionOptions prototype)

public static TransactionOptions.Builder newBuilder(TransactionOptions prototype)
Parameter
NameDescription
prototypeTransactionOptions
Returns
TypeDescription
TransactionOptions.Builder

parseDelimitedFrom(InputStream input)

public static TransactionOptions parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
TransactionOptions
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TransactionOptions parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TransactionOptions
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static TransactionOptions parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
TransactionOptions
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static TransactionOptions parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TransactionOptions
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static TransactionOptions parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
TransactionOptions
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static TransactionOptions parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TransactionOptions
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static TransactionOptions parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
TransactionOptions
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static TransactionOptions parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TransactionOptions
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static TransactionOptions parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
TransactionOptions
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TransactionOptions parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TransactionOptions
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static TransactionOptions parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
TransactionOptions
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static TransactionOptions parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TransactionOptions
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<TransactionOptions> parser()
Returns
TypeDescription
Parser<TransactionOptions>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public TransactionOptions getDefaultInstanceForType()
Returns
TypeDescription
TransactionOptions

getModeCase()

public TransactionOptions.ModeCase getModeCase()
Returns
TypeDescription
TransactionOptions.ModeCase

getParserForType()

public Parser<TransactionOptions> getParserForType()
Returns
TypeDescription
Parser<TransactionOptions>
Overrides

getReadOnly()

public TransactionOptions.ReadOnly getReadOnly()

The transaction should only allow reads.

.google.datastore.v1.TransactionOptions.ReadOnly read_only = 2;

Returns
TypeDescription
TransactionOptions.ReadOnly

The readOnly.

getReadOnlyOrBuilder()

public TransactionOptions.ReadOnlyOrBuilder getReadOnlyOrBuilder()

The transaction should only allow reads.

.google.datastore.v1.TransactionOptions.ReadOnly read_only = 2;

Returns
TypeDescription
TransactionOptions.ReadOnlyOrBuilder

getReadWrite()

public TransactionOptions.ReadWrite getReadWrite()

The transaction should allow both reads and writes.

.google.datastore.v1.TransactionOptions.ReadWrite read_write = 1;

Returns
TypeDescription
TransactionOptions.ReadWrite

The readWrite.

getReadWriteOrBuilder()

public TransactionOptions.ReadWriteOrBuilder getReadWriteOrBuilder()

The transaction should allow both reads and writes.

.google.datastore.v1.TransactionOptions.ReadWrite read_write = 1;

Returns
TypeDescription
TransactionOptions.ReadWriteOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hasReadOnly()

public boolean hasReadOnly()

The transaction should only allow reads.

.google.datastore.v1.TransactionOptions.ReadOnly read_only = 2;

Returns
TypeDescription
boolean

Whether the readOnly field is set.

hasReadWrite()

public boolean hasReadWrite()

The transaction should allow both reads and writes.

.google.datastore.v1.TransactionOptions.ReadWrite read_write = 1;

Returns
TypeDescription
boolean

Whether the readWrite field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public TransactionOptions.Builder newBuilderForType()
Returns
TypeDescription
TransactionOptions.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected TransactionOptions.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
TransactionOptions.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public TransactionOptions.Builder toBuilder()
Returns
TypeDescription
TransactionOptions.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException