Class ReadOptions (2.28.2)

publicfinalclass ReadOptionsextendsGeneratedMessageV3implementsReadOptionsOrBuilder

The options shared by read requests.

Protobuf type google.datastore.v1.ReadOptions

Inherited Members

com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

Static Fields

NEW_TRANSACTION_FIELD_NUMBER

publicstaticfinalintNEW_TRANSACTION_FIELD_NUMBER
Field Value
Type Description
int

READ_CONSISTENCY_FIELD_NUMBER

publicstaticfinalintREAD_CONSISTENCY_FIELD_NUMBER
Field Value
Type Description
int

READ_TIME_FIELD_NUMBER

publicstaticfinalintREAD_TIME_FIELD_NUMBER
Field Value
Type Description
int

TRANSACTION_FIELD_NUMBER

publicstaticfinalintTRANSACTION_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticReadOptionsgetDefaultInstance()
Returns
Type Description
ReadOptions

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticReadOptions.BuildernewBuilder()
Returns
Type Description
ReadOptions.Builder

newBuilder(ReadOptions prototype)

publicstaticReadOptions.BuildernewBuilder(ReadOptionsprototype)
Parameter
Name Description
prototype ReadOptions
Returns
Type Description
ReadOptions.Builder

parseDelimitedFrom(InputStream input)

publicstaticReadOptionsparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
ReadOptions
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticReadOptionsparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReadOptions
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticReadOptionsparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
ReadOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticReadOptionsparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReadOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticReadOptionsparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
ReadOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticReadOptionsparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReadOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticReadOptionsparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
ReadOptions
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticReadOptionsparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReadOptions
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticReadOptionsparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
ReadOptions
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticReadOptionsparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReadOptions
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticReadOptionsparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
ReadOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticReadOptionsparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ReadOptions
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<ReadOptions>parser()
Returns
Type Description
Parser<ReadOptions>

Methods

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getConsistencyTypeCase()

publicReadOptions.ConsistencyTypeCasegetConsistencyTypeCase()
Returns
Type Description
ReadOptions.ConsistencyTypeCase

getDefaultInstanceForType()

publicReadOptionsgetDefaultInstanceForType()
Returns
Type Description
ReadOptions

getNewTransaction()

publicTransactionOptionsgetNewTransaction()

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()

publicTransactionOptionsOrBuildergetNewTransactionOrBuilder()

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()

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

getReadConsistency()

publicReadOptions.ReadConsistencygetReadConsistency()

The non-transactional read consistency to use.

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

Returns
Type Description
ReadOptions.ReadConsistency

The readConsistency.

getReadConsistencyValue()

publicintgetReadConsistencyValue()

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()

publicTimestampgetReadTime()

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()

publicTimestampOrBuildergetReadTimeOrBuilder()

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()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getTransaction()

publicByteStringgetTransaction()

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()

publicbooleanhasNewTransaction()

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()

publicbooleanhasReadConsistency()

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()

publicbooleanhasReadTime()

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()

publicbooleanhasTransaction()

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()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicReadOptions.BuildernewBuilderForType()
Returns
Type Description
ReadOptions.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedReadOptions.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
ReadOptions.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicReadOptions.BuildertoBuilder()
Returns
Type Description
ReadOptions.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.