Class ReadOptions (2.18.5)

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
TypeDescription
int

READ_CONSISTENCY_FIELD_NUMBER

public static final int READ_CONSISTENCY_FIELD_NUMBER
Field Value
TypeDescription
int

READ_TIME_FIELD_NUMBER

public static final int READ_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

TRANSACTION_FIELD_NUMBER

public static final int TRANSACTION_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static ReadOptions getDefaultInstance()
Returns
TypeDescription
ReadOptions

getDescriptor()

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

newBuilder()

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

newBuilder(ReadOptions prototype)

public static ReadOptions.Builder newBuilder(ReadOptions prototype)
Parameter
NameDescription
prototypeReadOptions
Returns
TypeDescription
ReadOptions.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getConsistencyTypeCase()

public ReadOptions.ConsistencyTypeCase getConsistencyTypeCase()
Returns
TypeDescription
ReadOptions.ConsistencyTypeCase

getDefaultInstanceForType()

public ReadOptions getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
TransactionOptionsOrBuilder

getParserForType()

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

getReadConsistency()

public ReadOptions.ReadConsistency getReadConsistency()

The non-transactional read consistency to use.

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

Returns
TypeDescription
ReadOptions.ReadConsistency

The readConsistency.

getReadConsistencyValue()

public int getReadConsistencyValue()

The non-transactional read consistency to use.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
TimestampOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the transaction 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 ReadOptions.Builder newBuilderForType()
Returns
TypeDescription
ReadOptions.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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