Class ReadOptions (2.21.2)

public final class ReadOptions extends GeneratedMessageV3 implements ReadOptionsOrBuilder

The options shared by read requests.

Protobuf type google.datastore.v1.ReadOptions

Static Fields

NEW_TRANSACTION_FIELD_NUMBER

public static final int NEW_TRANSACTION_FIELD_NUMBER
Field Value
Type Description
int

READ_CONSISTENCY_FIELD_NUMBER

public static final int READ_CONSISTENCY_FIELD_NUMBER
Field Value
Type Description
int

READ_TIME_FIELD_NUMBER

public static final int READ_TIME_FIELD_NUMBER
Field Value
Type Description
int

TRANSACTION_FIELD_NUMBER

public static final int TRANSACTION_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static ReadOptions getDefaultInstance()
Returns
Type Description
ReadOptions

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static ReadOptions.Builder newBuilder()
Returns
Type Description
ReadOptions.Builder

newBuilder(ReadOptions prototype)

public static ReadOptions.Builder newBuilder(ReadOptions prototype)
Parameter
Name Description
prototype ReadOptions
Returns
Type Description
ReadOptions.Builder

parseDelimitedFrom(InputStream input)

public static ReadOptions parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ReadOptions
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ReadOptions parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReadOptions
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static ReadOptions parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
ReadOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ReadOptions parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReadOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ReadOptions parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
ReadOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ReadOptions parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReadOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ReadOptions parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
ReadOptions
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ReadOptions parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReadOptions
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static ReadOptions parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ReadOptions
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ReadOptions parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReadOptions
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static ReadOptions parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
ReadOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ReadOptions parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReadOptions
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<ReadOptions> parser()
Returns
Type Description
Parser<ReadOptions>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getConsistencyTypeCase()

public ReadOptions.ConsistencyTypeCase getConsistencyTypeCase()
Returns
Type Description
ReadOptions.ConsistencyTypeCase

getDefaultInstanceForType()

public ReadOptions getDefaultInstanceForType()
Returns
Type Description
ReadOptions

getNewTransaction()

public TransactionOptions getNewTransaction()

Options for beginning a new transaction for this request.

The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction.

.google.datastore.v1.TransactionOptions new_transaction = 3;

Returns
Type Description
TransactionOptions

The newTransaction.

getNewTransactionOrBuilder()

public TransactionOptionsOrBuilder getNewTransactionOrBuilder()

Options for beginning a new transaction for this request.

The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction.

.google.datastore.v1.TransactionOptions new_transaction = 3;

Returns
Type Description
TransactionOptionsOrBuilder

getParserForType()

public Parser<ReadOptions> getParserForType()
Returns
Type Description
Parser<ReadOptions>
Overrides

getReadConsistency()

public ReadOptions.ReadConsistency getReadConsistency()

The non-transactional read consistency to use.

.google.datastore.v1.ReadOptions.ReadConsistency read_consistency = 1;

Returns
Type Description
ReadOptions.ReadConsistency

The readConsistency.

getReadConsistencyValue()

public int getReadConsistencyValue()

The non-transactional read consistency to use.

.google.datastore.v1.ReadOptions.ReadConsistency read_consistency = 1;

Returns
Type Description
int

The enum numeric value on the wire for readConsistency.

getReadTime()

public Timestamp getReadTime()

Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode.

This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.

.google.protobuf.Timestamp read_time = 4;

Returns
Type Description
Timestamp

The readTime.

getReadTimeOrBuilder()

public TimestampOrBuilder getReadTimeOrBuilder()

Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode.

This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.

.google.protobuf.Timestamp read_time = 4;

Returns
Type Description
TimestampOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getTransaction()

public ByteString getTransaction()

The identifier of the transaction in which to read. A transaction identifier is returned by a call to Datastore.BeginTransaction.

bytes transaction = 2;

Returns
Type Description
ByteString

The transaction.

hasNewTransaction()

public boolean hasNewTransaction()

Options for beginning a new transaction for this request.

The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction.

.google.datastore.v1.TransactionOptions new_transaction = 3;

Returns
Type Description
boolean

Whether the newTransaction field is set.

hasReadConsistency()

public boolean hasReadConsistency()

The non-transactional read consistency to use.

.google.datastore.v1.ReadOptions.ReadConsistency read_consistency = 1;

Returns
Type Description
boolean

Whether the readConsistency field is set.

hasReadTime()

public boolean hasReadTime()

Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode.

This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.

.google.protobuf.Timestamp read_time = 4;

Returns
Type Description
boolean

Whether the readTime field is set.

hasTransaction()

public boolean hasTransaction()

The identifier of the transaction in which to read. A transaction identifier is returned by a call to Datastore.BeginTransaction.

bytes transaction = 2;

Returns
Type Description
boolean

Whether the transaction field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public ReadOptions.Builder newBuilderForType()
Returns
Type Description
ReadOptions.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ReadOptions.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
ReadOptions.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public ReadOptions.Builder toBuilder()
Returns
Type Description
ReadOptions.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException